Fix window moving and resizing for rootless mode

This commit is contained in:
Kensuke Matsuzaki 2004-01-31 16:28:54 +00:00
parent 829a8956a7
commit ee77bd2f20
3 changed files with 10 additions and 32 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}