]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fixed strange window movement when clicking on title bar and keeping it pressed and...
authorToni Wilen <twilen@winuae.net>
Sun, 5 Jan 2025 16:24:59 +0000 (18:24 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 5 Jan 2025 16:24:59 +0000 (18:24 +0200)
od-win32/win32.cpp

index 8c9be6273b6a16ed665e0707fceac101d3c55e77..56fd406e6a279f345764793f29d3f1b9e9b81f43 100644 (file)
@@ -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;