From ee77bd2f20316abf1e4a441553fa9ed66344332d Mon Sep 17 00:00:00 2001 From: Kensuke Matsuzaki Date: Sat, 31 Jan 2004 16:28:54 +0000 Subject: [PATCH] Fix window moving and resizing for rootless mode --- hw/xwin/winwin32rootless.c | 29 ++++------------------------- hw/xwin/winwin32rootlesswndproc.c | 8 ++++---- hw/xwin/winwindowswm.c | 5 ++--- 3 files changed, 10 insertions(+), 32 deletions(-) diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c index 398c5b2e3..c37f9ef14 100755 --- a/hw/xwin/winwin32rootless.c +++ b/hw/xwin/winwin32rootless.c @@ -519,33 +519,12 @@ winWin32RootlessRestackFrame (RootlessFrameID wid, RootlessFrameID nextWid) pRLWinPriv->fRestackingNow = TRUE; - /* Show window */ + /* Show window */ if(!IsWindowVisible (pRLWinPriv->hWnd)) - ShowWindow (pRLWinPriv->hWnd, SW_SHOWNA); + ShowWindow (pRLWinPriv->hWnd, SW_SHOWNOACTIVATE); + + pScreenPriv->fWindowOrderChanged = TRUE; - if (pRLNextWinPriv == NULL) - { - //ErrorF ("Win %08x is top\n", pRLWinPriv); - pScreenPriv->widTop = wid; - SetWindowPos (pRLWinPriv->hWnd, HWND_TOP, - 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); - } - else - { - //ErrorF ("Win %08x is not top\n", pRLWinPriv); - hWnd = GetNextWindow (pRLWinPriv->hWnd, GW_HWNDPREV); - do - { - if (hWnd == pRLNextWinPriv->hWnd) - { - SetWindowPos (pRLWinPriv->hWnd, pRLNextWinPriv->hWnd, - 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); - break; - } - hWnd = GetNextWindow (hWnd, GW_HWNDPREV); - } - while (hWnd); - } pRLWinPriv->fRestackingNow = FALSE; } diff --git a/hw/xwin/winwin32rootlesswndproc.c b/hw/xwin/winwin32rootlesswndproc.c index 63dcb4bb4..6a9573b65 100755 --- a/hw/xwin/winwin32rootlesswndproc.c +++ b/hw/xwin/winwin32rootlesswndproc.c @@ -840,7 +840,7 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, #if CYGMULTIWINDOW_DEBUG ErrorF ("Win %08x is now restacking.\n", (unsigned int)pRLWinPriv); #endif - return 0; + break; } if (IsRaiseOnClick (pWin)) @@ -848,7 +848,7 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, #if CYGMULTIWINDOW_DEBUG ErrorF ("Win %08x has WINDOWSWM_RAISE_ON_CLICK.\n", (unsigned int)pRLWinPriv); #endif - return 0; + break; } #if CYGMULTIWINDOW_DEBUG @@ -952,7 +952,7 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, if (pScreenPriv != NULL) pScreenPriv->fWindowOrderChanged = TRUE; } - return 0; + break; case WM_SIZE: /* see dix/window.c */ @@ -1089,7 +1089,7 @@ winWin32RootlessWindowProc (HWND hwnd, UINT message, rcClient.bottom - rcClient.top - wBorderWidth (pWin)*2); break; - + default: break; } diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c index 82fb078f6..5cdc8b8df 100755 --- a/hw/xwin/winwindowswm.c +++ b/hw/xwin/winwindowswm.c @@ -496,10 +496,9 @@ ProcWindowsWMFrameDraw (register ClientPtr client) /* Flush the window style */ if (!SetWindowPos (pRLWinPriv->hWnd, NULL, - 0, 0, + rcNew.left, rcNew.top, rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, - SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED - /* | SWP_SHOWWINDOW*/ | SWP_NOACTIVATE)) + SWP_NOZORDER | SWP_FRAMECHANGED | SWP_NOACTIVATE)) { return BadValue; }