From a57a3c78d4b9434e37c5c505fa0171d587e549fd Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 13 Mar 2026 13:15:58 -0400 Subject: [PATCH] fixes --- src/bg_shader.py | 2 +- src/gui_2.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/bg_shader.py b/src/bg_shader.py index 421a51b..80119e1 100644 --- a/src/bg_shader.py +++ b/src/bg_shader.py @@ -12,7 +12,7 @@ class BackgroundShader: self.ctx: Optional[nvg.Context] = None def render(self, width: float, height: float): - if not self.enabled: + if not self.enabled or width <= 0 or height <= 0: return # In imgui-bundle, hello_imgui handles the background. diff --git a/src/gui_2.py b/src/gui_2.py index ee16420..cac5172 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -387,8 +387,10 @@ class App: curr_x = imgui.get_cursor_pos_x() drag_w = right_x - curr_x if drag_w > 0: - imgui.invisible_button("##drag_area", (drag_w, 0)) - if imgui.is_item_hovered() and imgui.is_mouse_clicked(0): + # Use a small positive height to satisfy IM_ASSERT(size_arg.y != 0.0f) + # The menu bar naturally constrains the hit box height anyway. + imgui.invisible_button("##drag_area", (drag_w, 20.0)) + if imgui.is_item_active() and imgui.is_mouse_dragging(0): win32gui.ReleaseCapture() win32gui.SendMessage(hwnd, win32con.WM_NCLBUTTONDOWN, win32con.HTCAPTION, 0)