This commit is contained in:
2026-03-13 13:15:58 -04:00
parent ca01397885
commit a57a3c78d4
2 changed files with 5 additions and 3 deletions

View File

@@ -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.

View File

@@ -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)