diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2016-07-12 14:58:37 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-05-13 18:21:59 +0100 |
commit | befc03eb6cc1bfffef73215afa8950215471c0c7 (patch) | |
tree | a4fe0a4c0541b73bf1b28e46d65b05dfc06bf238 | |
parent | 95399d5fc61707619c133a26425eb94ebc448653 (diff) |
Fix non-toplevel window resizing/repositioning
Fix regressions in non-toplevel window resizing/repositioning introduced in
"Avoid potential re-entrancy of xserver code in winPositionWindowMultiwindow"
Avoid erroneous fall-through to top-level case in winAdjustWindowsWindow().
Implement WM_ASYNCMOVE for non-toplevel windows.
These omissions caused non-toplevel WGL windows to not be resized correctly.
-rw-r--r-- | hw/xwin/winmultiwindowwindow.c | 2 | ||||
-rw-r--r-- | hw/xwin/winmultiwindowwndproc.c | 23 |
2 files changed, 25 insertions, 0 deletions
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index 7ff598743..0f65bd93a 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -282,6 +282,8 @@ winAdjustWindowsWindow(WindowPtr pWin, HWND hWnd) MoveWindow(hWnd, iX - parentOrigin.x, iY - parentOrigin.y, iWidth, iHeight, TRUE); + + return; } /* Get the Windows window style and extended style */ diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index 66b37aefd..c58de0ef3 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -1173,10 +1173,29 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK winChildWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { + WindowPtr pWin = NULL; + #if CYGDEBUG winDebugWin32Message("winChildWindowProc", hwnd, message, wParam, lParam); #endif + /* + If this is WM_CREATE, set up the Windows window properties which point to + X window information + */ + if (message == WM_CREATE) { + SetProp(hwnd, + WIN_WINDOW_PROP, + (HANDLE) ((LPCREATESTRUCT) lParam)->lpCreateParams); + SetProp(hwnd, + WIN_WID_PROP, + (HANDLE) (INT_PTR)winGetWindowID(((LPCREATESTRUCT) lParam)-> + lpCreateParams)); + } + + /* Retrieve the Windows window property for our X window pointer */ + pWin = GetProp(hwnd, WIN_WINDOW_PROP); + switch (message) { case WM_ERASEBKGND: return TRUE; @@ -1197,6 +1216,10 @@ winChildWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) return 0; } /* XXX: this is exactly what DefWindowProc does? */ + + case WM_ASYNCMOVE: + winAdjustWindowsWindow(pWin, hwnd); + break; } return DefWindowProc(hwnd, message, wParam, lParam); |