mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 10:18:04 +02:00
Revert the previous change due to server crashes.
This commit is contained in:
parent
7554a68461
commit
1279041de1
4 changed files with 53 additions and 29 deletions
|
|
@ -508,7 +508,7 @@ typedef struct _winPrivScreenRec
|
|||
/* Privates used by both multi-window and rootless */
|
||||
Bool fRootWindowShown;
|
||||
Bool fRestacking;
|
||||
Bool fWindowOrderChanged; /* Only for rootless */
|
||||
Bool fWindowOrderChanged;
|
||||
|
||||
#if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW)
|
||||
/* Privates used for any module running in a seperate thread */
|
||||
|
|
|
|||
|
|
@ -88,6 +88,11 @@ winBlockHandler_ProcessMessages:
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef XWIN_MULTIWINDOW
|
||||
if (pScreenPriv->pScreenInfo->fMultiWindow)
|
||||
winReorderWindowsMultiWindow ((ScreenPtr)pBlockData);
|
||||
#endif
|
||||
|
||||
#ifdef XWIN_MULTIWINDOWEXTWM
|
||||
if (pScreenPriv->pScreenInfo->fMWExtWM)
|
||||
winMWExtWMReorderWindows ((ScreenPtr)pBlockData);
|
||||
|
|
|
|||
|
|
@ -737,9 +737,7 @@ winFindWindow (pointer value, XID id, pointer cdata)
|
|||
|
||||
|
||||
/*
|
||||
* winReorderWindowsMultiWindow -
|
||||
*
|
||||
* Change X windows' Z orders with respect to their Windows counterparts.
|
||||
* winReorderWindowsMultiWindow -
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -756,41 +754,48 @@ winReorderWindowsMultiWindow (ScreenPtr pScreen)
|
|||
#if CYGMULTIWINDOW_DEBUG
|
||||
ErrorF ("winReorderWindowsMultiWindow\n");
|
||||
#endif
|
||||
|
||||
|
||||
pScreenPriv->fRestacking = TRUE;
|
||||
|
||||
hwnd = GetTopWindow (NULL);
|
||||
|
||||
while (hwnd)
|
||||
if (pScreenPriv->fWindowOrderChanged)
|
||||
{
|
||||
GetWindowThreadProcessId (hwnd, &dwWindowProcessID);
|
||||
#if CYGMULTIWINDOW_DEBUG
|
||||
ErrorF ("winReorderWindowsMultiWindow - Need to restack\n");
|
||||
#endif
|
||||
hwnd = GetTopWindow (NULL);
|
||||
|
||||
if ( (dwWindowProcessID == dwCurrentProcessID)
|
||||
&& GetProp (hwnd, WIN_WINDOW_PROP)
|
||||
&& !IsIconic (hwnd) ) /* ignore minimized windows */
|
||||
while (hwnd)
|
||||
{
|
||||
pWinSib = pWin;
|
||||
pWin = GetProp (hwnd, WIN_WINDOW_PROP);
|
||||
|
||||
if (!pWinSib)
|
||||
{ /* 1st window - raise to the top */
|
||||
vlist[0] = Above;
|
||||
|
||||
ConfigureWindow (pWin, CWStackMode, vlist, wClient(pWin));
|
||||
}
|
||||
else
|
||||
{ /* 2nd or deeper windows - just below the previous one */
|
||||
vlist[0] = winGetWindowID (pWinSib);
|
||||
vlist[1] = Below;
|
||||
GetWindowThreadProcessId (hwnd, &dwWindowProcessID);
|
||||
|
||||
ConfigureWindow (pWin, CWSibling | CWStackMode,
|
||||
vlist, wClient(pWin));
|
||||
if ( (dwWindowProcessID == dwCurrentProcessID)
|
||||
&& GetProp (hwnd, WIN_WINDOW_PROP)
|
||||
&& !IsIconic (hwnd) ) /* ignore minimized windows */
|
||||
{
|
||||
pWinSib = pWin;
|
||||
pWin = GetProp (hwnd, WIN_WINDOW_PROP);
|
||||
|
||||
if (!pWinSib)
|
||||
{ /* 1st window - raise to the top */
|
||||
vlist[0] = Above;
|
||||
|
||||
ConfigureWindow (pWin, CWStackMode, vlist, wClient(pWin));
|
||||
}
|
||||
else
|
||||
{ /* 2nd or deeper windows - just below the previous one */
|
||||
vlist[0] = winGetWindowID (pWinSib);
|
||||
vlist[1] = Below;
|
||||
|
||||
ConfigureWindow (pWin, CWSibling | CWStackMode,
|
||||
vlist, wClient(pWin));
|
||||
}
|
||||
}
|
||||
hwnd = GetNextWindow (hwnd, GW_HWNDNEXT);
|
||||
}
|
||||
hwnd = GetNextWindow (hwnd, GW_HWNDNEXT);
|
||||
}
|
||||
|
||||
pScreenPriv->fRestacking = FALSE;
|
||||
pScreenPriv->fWindowOrderChanged = FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -620,7 +620,6 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
|||
break;
|
||||
|
||||
winRestoreModeKeyStates ();
|
||||
winReorderWindowsMultiWindow (s_pScreen);
|
||||
return 0;
|
||||
|
||||
case WM_KILLFOCUS:
|
||||
|
|
@ -727,6 +726,9 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
|||
/* Pass the message to the root window */
|
||||
SendMessage (hwndScreen, message, wParam, lParam);
|
||||
|
||||
if (s_pScreenPriv != NULL)
|
||||
s_pScreenPriv->fWindowOrderChanged = TRUE;
|
||||
|
||||
if (LOWORD(wParam) != WA_INACTIVE)
|
||||
{
|
||||
/* Tell our Window Manager thread to activate the window */
|
||||
|
|
@ -888,6 +890,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
|||
if (fWMMsgInitialized)
|
||||
winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
|
||||
|
||||
if (s_pScreenPriv != NULL)
|
||||
s_pScreenPriv->fWindowOrderChanged = TRUE;
|
||||
return 0;
|
||||
|
||||
case WM_SIZING:
|
||||
|
|
@ -896,6 +900,16 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
|||
return ValidateSizing (hwnd, pWin, wParam, lParam);
|
||||
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
if (!( ((LPWINDOWPOS)lParam)->flags
|
||||
& SWP_NOZORDER ))
|
||||
{
|
||||
#if CYGWINDOWING_DEBUG
|
||||
ErrorF ("winTopLevelWindowProc - WM_WINDOWPOSCHANGED: "
|
||||
"Z order is changed\n");
|
||||
#endif
|
||||
if (s_pScreenPriv != NULL)
|
||||
s_pScreenPriv->fWindowOrderChanged = TRUE;
|
||||
}
|
||||
/*
|
||||
* Pass the message to DefWindowProc to let the function
|
||||
* break down WM_WINDOWPOSCHANGED to WM_MOVE and WM_SIZE.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue