From: Toni Wilen Date: Sun, 5 Jan 2025 16:24:59 +0000 (+0200) Subject: Fixed strange window movement when clicking on title bar and keeping it pressed and... X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=64f1306941df48f2160daa4bc55a0fc59e40a1c3;p=francis%2Fwinuae.git Fixed strange window movement when clicking on title bar and keeping it pressed and "Automatically capture mouse when window is activated" was enabled. --- diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 8c9be627..56fd406e 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -1992,10 +1992,12 @@ static int inresizing; static int nSizingEdge; static POINT ptResizePos; static RECT rcResizeStartWindowRect; +static BOOL inresizefirst; static void StartCustomResize(AmigaMonitor *mon, HWND hWindow, int nEdge, int x, int y) { inresizing = TRUE; + inresizefirst = TRUE; SetCapture(hWindow); nSizingEdge = nEdge; ptResizePos.x = x; @@ -2055,8 +2057,13 @@ static void CustomResizeMouseMove(AmigaMonitor *mon, HWND hWindow) h += dy; break; case -1: - x += dx; - y += dy; + if (inresizefirst) { + changed = false; + inresizefirst = FALSE; + } else { + x += dx; + y += dy; + } break; default: changed = false;