Prevent winRaiseWindow from calling ConfigureWindow if the message was sent
from within winDestroyWindowsWindow DestroyWindow send a WM_WINDOWPOSCHANGED to another window causing a restacking of all windows, even of the window which is just about to destroyed and whose structures may not be intact anymore.
This commit is contained in:
parent
978f3b496b
commit
cb0aa2b4d8
|
@ -1,3 +1,14 @@
|
||||||
|
2005-03-07 Alexander Gottwald <ago at freedesktop dot org>
|
||||||
|
|
||||||
|
* winmultiwindowwndproc.c:
|
||||||
|
* winmultiwindowwindow.c:
|
||||||
|
Prevent winRaiseWindow from calling ConfigureWindow if the message
|
||||||
|
was sent from within winDestroyWindowsWindow
|
||||||
|
|
||||||
|
DestroyWindow send a WM_WINDOWPOSCHANGED to another window causing
|
||||||
|
a restacking of all windows, even of the window which is just about
|
||||||
|
to destroyed and whose structures may not be intact anymore.
|
||||||
|
|
||||||
2005-02-24 Alexander Gottwald <ago at freedesktop dot org>
|
2005-02-24 Alexander Gottwald <ago at freedesktop dot org>
|
||||||
|
|
||||||
* winmultiwindowwndproc.c:
|
* winmultiwindowwndproc.c:
|
||||||
|
|
|
@ -611,6 +611,7 @@ winCreateWindowsWindow (WindowPtr pWin)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Bool winInDestroyWindowsWindow = FALSE;
|
||||||
/*
|
/*
|
||||||
* winDestroyWindowsWindow - Destroy a Windows window associated
|
* winDestroyWindowsWindow - Destroy a Windows window associated
|
||||||
* with an X window
|
* with an X window
|
||||||
|
@ -625,6 +626,7 @@ winDestroyWindowsWindow (WindowPtr pWin)
|
||||||
HMODULE hInstance;
|
HMODULE hInstance;
|
||||||
int iReturn;
|
int iReturn;
|
||||||
char pszClass[512];
|
char pszClass[512];
|
||||||
|
BOOL oldstate = winInDestroyWindowsWindow;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
ErrorF ("winDestroyWindowsWindow\n");
|
ErrorF ("winDestroyWindowsWindow\n");
|
||||||
|
@ -634,6 +636,8 @@ winDestroyWindowsWindow (WindowPtr pWin)
|
||||||
if (pWinPriv->hWnd == NULL)
|
if (pWinPriv->hWnd == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
winInDestroyWindowsWindow = TRUE;
|
||||||
|
|
||||||
/* Store the info we need to destroy after this window is gone */
|
/* Store the info we need to destroy after this window is gone */
|
||||||
hInstance = (HINSTANCE) GetClassLong (pWinPriv->hWnd, GCL_HMODULE);
|
hInstance = (HINSTANCE) GetClassLong (pWinPriv->hWnd, GCL_HMODULE);
|
||||||
hiconClass = (HICON) GetClassLong (pWinPriv->hWnd, GCL_HICON);
|
hiconClass = (HICON) GetClassLong (pWinPriv->hWnd, GCL_HICON);
|
||||||
|
@ -646,7 +650,7 @@ winDestroyWindowsWindow (WindowPtr pWin)
|
||||||
|
|
||||||
/* Null our handle to the Window so referencing it will cause an error */
|
/* Null our handle to the Window so referencing it will cause an error */
|
||||||
pWinPriv->hWnd = NULL;
|
pWinPriv->hWnd = NULL;
|
||||||
|
|
||||||
/* Process all messages on our queue */
|
/* Process all messages on our queue */
|
||||||
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
|
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
|
||||||
{
|
{
|
||||||
|
@ -672,6 +676,8 @@ winDestroyWindowsWindow (WindowPtr pWin)
|
||||||
winDestroyIcon(hiconSmClass);
|
winDestroyIcon(hiconSmClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
winInDestroyWindowsWindow = oldstate;
|
||||||
|
|
||||||
#if CYGMULTIWINDOW_DEBUG
|
#if CYGMULTIWINDOW_DEBUG
|
||||||
ErrorF ("-winDestroyWindowsWindow\n");
|
ErrorF ("-winDestroyWindowsWindow\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -265,13 +265,17 @@ ValidateSizing (HWND hwnd, WindowPtr pWin,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern Bool winInDestroyWindowsWindow;
|
||||||
static void winRaiseWindow(WindowPtr pWin)
|
static void winRaiseWindow(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
|
if (!winInDestroyWindowsWindow)
|
||||||
|
{
|
||||||
/* Call configure window directly to make sure it gets processed
|
/* Call configure window directly to make sure it gets processed
|
||||||
* in time
|
* in time
|
||||||
*/
|
*/
|
||||||
XID vlist[1] = { 0 };
|
XID vlist[1] = { 0 };
|
||||||
ConfigureWindow(pWin, CWStackMode, vlist, NULL);
|
ConfigureWindow(pWin, CWStackMode, vlist, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue