From 87bd2ae11c4d997f7502663a71f1fc074d8d1cc6 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 13 Mar 2026 13:23:31 -0400 Subject: [PATCH] fixed. --- imgui.ini | 3 --- src/gui_2.py | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/imgui.ini b/imgui.ini index 22a87bb..797698c 100644 --- a/imgui.ini +++ b/imgui.ini @@ -9,9 +9,7 @@ Collapsed=0 [Docking][Data] - ;;;<<>>;;; - ;;;<<>>;;; [Layout] Name=Default @@ -20,6 +18,5 @@ Show=false ShowFps=true [Theme] Name=DarculaDarker - ;;;<<>>;;; {"gImGuiSplitIDs":{}} diff --git a/src/gui_2.py b/src/gui_2.py index cac5172..6d8bc9b 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -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)