This commit is contained in:
2026-03-13 13:23:31 -04:00
parent a57a3c78d4
commit 87bd2ae11c
2 changed files with 4 additions and 3 deletions

View File

@@ -9,9 +9,7 @@ Collapsed=0
[Docking][Data]
;;;<<<Layout_655921752_Default>>>;;;
;;;<<<HelloImGui_Misc>>>;;;
[Layout]
Name=Default
@@ -20,6 +18,5 @@ Show=false
ShowFps=true
[Theme]
Name=DarculaDarker
;;;<<<SplitIds>>>;;;
{"gImGuiSplitIDs":{}}

View File

@@ -391,6 +391,10 @@ class App:
# 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):
# CRITICAL: We must reset ImGui's mouse_down state BEFORE passing control to Windows.
# Otherwise, the Windows modal drag loop swallows the WM_LBUTTONUP event,
# and ImGui thinks the mouse is permanently held down, causing "sticky" dragging.
imgui.get_io().mouse_down[0] = False
win32gui.ReleaseCapture()
win32gui.SendMessage(hwnd, win32con.WM_NCLBUTTONDOWN, win32con.HTCAPTION, 0)