diff options
author | marha <marha@users.sourceforge.net> | 2011-07-15 10:57:32 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-15 10:57:32 +0200 |
commit | cfe47427e85b626bfb92c6ecb6eb43a2eb80a552 (patch) | |
tree | 3b04ffa94f2039eeafd9aaeacb19c8cff9cf9270 /xorg-server | |
parent | 31ee9c57db79281e122d3c4acb0f8eae07f4449f (diff) | |
download | vcxsrv-cfe47427e85b626bfb92c6ecb6eb43a2eb80a552.tar.gz vcxsrv-cfe47427e85b626bfb92c6ecb6eb43a2eb80a552.tar.bz2 vcxsrv-cfe47427e85b626bfb92c6ecb6eb43a2eb80a552.zip |
Reverted commit 3bbcbc59b6d98f09b26f39d6208faec76cc6aa3e
But only for file winmultiwindowwndproc.c
This caused regression in multiwindow mode when wgl was used.
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowwndproc.c | 59 |
1 files changed, 6 insertions, 53 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c index f56e150b8..8ff7422b2 100644 --- a/xorg-server/hw/xwin/winmultiwindowwndproc.c +++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c @@ -1002,61 +1002,14 @@ winTopLevelWindowProc (HWND hwnd, UINT message, if (wParam == SIZE_MINIMIZED) winReorderWindowsMultiWindow(); return 0; /* end of WM_SIZE handler */ - case WM_STYLECHANGING: - /* - When the style changes, adjust the Windows window size so the client area remains the same size, - and adjust the Windows window position so that the client area remains in the same place. - */ - { - RECT newWinRect; - DWORD dwExStyle; - DWORD dwStyle; - DWORD newStyle = ((STYLESTRUCT *)lParam)->styleNew; - WINDOWINFO wi; - - dwExStyle = GetWindowLongPtr (hwnd, GWL_EXSTYLE); - dwStyle = GetWindowLongPtr (hwnd, GWL_STYLE); - - winDebug("winTopLevelWindowProc - WM_STYLECHANGING from %08x %08x\n", dwStyle, dwExStyle); - - if (wParam == GWL_EXSTYLE) - dwExStyle = newStyle; - - if (wParam == GWL_STYLE) - dwStyle = newStyle; - - winDebug("winTopLevelWindowProc - WM_STYLECHANGING to %08x %08x\n", dwStyle, dwExStyle); - - /* Get client rect in screen coordinates */ - wi.cbSize = sizeof(WINDOWINFO); - GetWindowInfo(hwnd, &wi); - - winDebug("winTopLevelWindowProc - WM_STYLECHANGING client area {%d, %d, %d, %d}, {%d x %d}\n", wi.rcClient.left, wi.rcClient.top, wi.rcClient.right, wi.rcClient.bottom, wi.rcClient.right - wi.rcClient.left, wi.rcClient.bottom - wi.rcClient.top); - - newWinRect = wi.rcClient; - if (!AdjustWindowRectEx(&newWinRect, dwStyle, FALSE, dwExStyle)) - winDebug("winTopLevelWindowProc - WM_STYLECHANGING AdjustWindowRectEx failed\n"); - - winDebug("winTopLevelWindowProc - WM_STYLECHANGING window area should be {%d, %d, %d, %d}, {%d x %d}\n", newWinRect.left, newWinRect.top, newWinRect.right, newWinRect.bottom, newWinRect.right - newWinRect.left, newWinRect.bottom - newWinRect.top); - - /* - Style change hasn't happened yet, so we can't adjust the window size yet, as the winAdjustXWindow() - which WM_SIZE does will use the current (unchanged) style. Instead make a note to change it when - WM_STYLECHANGED is received... - */ - pWinPriv->hDwp = BeginDeferWindowPos(1); - pWinPriv->hDwp = DeferWindowPos(pWinPriv->hDwp, hwnd, NULL, newWinRect.left, newWinRect.top, newWinRect.right - newWinRect.left, newWinRect.bottom - newWinRect.top, SWP_NOACTIVATE | SWP_NOZORDER); - } - return 0; - case WM_STYLECHANGED: + /* when the style changes, adjust the window size so the client area remains the same */ { - if (pWinPriv->hDwp) - { - EndDeferWindowPos(pWinPriv->hDwp); - pWinPriv->hDwp = NULL; - } - winDebug("winTopLevelWindowProc - WM_STYLECHANGED done\n"); + LONG x,y; + DrawablePtr pDraw = &pWin->drawable; + x = pDraw->x - wBorderWidth(pWin); + y = pDraw->y - wBorderWidth(pWin); + winPositionWindowMultiWindow(pWin, x, y); } return 0; |