winmultiwindowwindow.c
Create windows with SWP_NOACTIVATE flag (updated) (Kensuke Matsuzaki) Fixes for window ordering problem (updated) (Kensuke Matsuzaki)
This commit is contained in:
parent
374b9aa8ce
commit
d3ca132061
|
@ -1,3 +1,14 @@
|
||||||
|
2005-01-31 Alexander Gottwald <ago at freedesktop dot org>
|
||||||
|
|
||||||
|
* winmultiwindowwindow.c
|
||||||
|
* winmultiwindowwndproc.c:
|
||||||
|
Create windows with SWP_NOACTIVATE flag (updated) (Kensuke Matsuzaki)
|
||||||
|
|
||||||
|
2005-01-31 Alexander Gottwald <ago at freedesktop dot org>
|
||||||
|
|
||||||
|
* winmultiwindowwndproc.c:
|
||||||
|
Fixes for window ordering problem (updated) (Kensuke Matsuzaki)
|
||||||
|
|
||||||
2005-01-31 Alexander Gottwald <ago at freedesktop dot org>
|
2005-01-31 Alexander Gottwald <ago at freedesktop dot org>
|
||||||
|
|
||||||
* winconfig.c:
|
* winconfig.c:
|
||||||
|
|
|
@ -572,7 +572,7 @@ winCreateWindowsWindow (WindowPtr pWin)
|
||||||
/* Change style back to popup, already placed... */
|
/* Change style back to popup, already placed... */
|
||||||
SetWindowLong (hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
|
SetWindowLong (hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
|
||||||
SetWindowPos (hWnd, 0, 0, 0, 0, 0,
|
SetWindowPos (hWnd, 0, 0, 0, 0, 0,
|
||||||
SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
|
SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||||
/* Make sure it gets the proper system menu for a WS_POPUP, too */
|
/* Make sure it gets the proper system menu for a WS_POPUP, too */
|
||||||
GetSystemMenu (hWnd, TRUE);
|
GetSystemMenu (hWnd, TRUE);
|
||||||
|
|
||||||
|
|
|
@ -922,7 +922,7 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
||||||
ErrorF ("overridden window is shown\n");
|
ErrorF ("overridden window is shown\n");
|
||||||
#endif
|
#endif
|
||||||
SetWindowPos (hwnd, HWND_TOPMOST, 0, 0, 0, 0,
|
SetWindowPos (hwnd, HWND_TOPMOST, 0, 0, 0, 0,
|
||||||
SWP_NOMOVE | SWP_NOSIZE);
|
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup the Window Manager message */
|
/* Setup the Window Manager message */
|
||||||
|
@ -942,6 +942,7 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
||||||
return ValidateSizing (hwnd, pWin, wParam, lParam);
|
return ValidateSizing (hwnd, pWin, wParam, lParam);
|
||||||
|
|
||||||
case WM_WINDOWPOSCHANGING:
|
case WM_WINDOWPOSCHANGING:
|
||||||
|
#if 0
|
||||||
if (lParam != 0)
|
if (lParam != 0)
|
||||||
{
|
{
|
||||||
WINDOWPOS *windowpos = (WINDOWPOS *)lParam;
|
WINDOWPOS *windowpos = (WINDOWPOS *)lParam;
|
||||||
|
@ -978,8 +979,67 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
||||||
winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
|
winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case WM_WINDOWPOSCHANGED:
|
case WM_WINDOWPOSCHANGED:
|
||||||
|
{
|
||||||
|
LPWINDOWPOS pWinPos = (LPWINDOWPOS) lParam;
|
||||||
|
|
||||||
|
if (!(pWinPos->flags & SWP_NOZORDER))
|
||||||
|
{
|
||||||
|
#if CYGWINDOWING_DEBUG
|
||||||
|
winDebug ("\twindow z order was changed\n");
|
||||||
|
#endif
|
||||||
|
if (pWinPos->hwndInsertAfter == HWND_TOP
|
||||||
|
||pWinPos->hwndInsertAfter == HWND_TOPMOST
|
||||||
|
||pWinPos->hwndInsertAfter == HWND_NOTOPMOST)
|
||||||
|
{
|
||||||
|
#if CYGWINDOWING_DEBUG
|
||||||
|
winDebug ("\traise to top\n");
|
||||||
|
#endif
|
||||||
|
/* Raise the window to the top in Z order */
|
||||||
|
wmMsg.msg = WM_WM_RAISE;
|
||||||
|
if (fWMMsgInitialized)
|
||||||
|
winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
|
||||||
|
}
|
||||||
|
else if (pWinPos->hwndInsertAfter == HWND_BOTTOM)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Check if this window is top of X windows. */
|
||||||
|
HWND hWndAbove = NULL;
|
||||||
|
DWORD dwCurrentProcessID = GetCurrentProcessId ();
|
||||||
|
DWORD dwWindowProcessID = 0;
|
||||||
|
|
||||||
|
for (hWndAbove = pWinPos->hwndInsertAfter;
|
||||||
|
hWndAbove != NULL;
|
||||||
|
hWndAbove = GetNextWindow (hWndAbove, GW_HWNDPREV))
|
||||||
|
{
|
||||||
|
/* Ignore other XWin process's window */
|
||||||
|
GetWindowThreadProcessId (hWndAbove, &dwWindowProcessID);
|
||||||
|
|
||||||
|
if ((dwWindowProcessID == dwCurrentProcessID)
|
||||||
|
&& GetProp (hWndAbove, WIN_WINDOW_PROP)
|
||||||
|
&& !IsWindowVisible (hWndAbove)
|
||||||
|
&& !IsIconic (hWndAbove) ) /* ignore minimized windows */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* If this is top of X windows in Windows stack,
|
||||||
|
raise it in X stack. */
|
||||||
|
if (hWndAbove == NULL)
|
||||||
|
{
|
||||||
|
#if CYGWINDOWING_DEBUG
|
||||||
|
winDebug ("\traise to top\n");
|
||||||
|
#endif
|
||||||
|
/* Raise the window to the top in Z order */
|
||||||
|
wmMsg.msg = WM_WM_RAISE;
|
||||||
|
if (fWMMsgInitialized)
|
||||||
|
winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Pass the message to DefWindowProc to let the function
|
* Pass the message to DefWindowProc to let the function
|
||||||
* break down WM_WINDOWPOSCHANGED to WM_MOVE and WM_SIZE.
|
* break down WM_WINDOWPOSCHANGED to WM_MOVE and WM_SIZE.
|
||||||
|
|
Loading…
Reference in New Issue