diff options
author | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2005-03-07 22:26:59 +0000 |
---|---|---|
committer | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2005-03-07 22:26:59 +0000 |
commit | cb0aa2b4d8875f1ea66e720ca7c6cc2f403be26a (patch) | |
tree | 20b5e960118a6c2ac655e3c39915cc530ba9423e /hw/xwin | |
parent | 978f3b496b9951ee8120a0efcc5cd12503e26770 (diff) |
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.
Diffstat (limited to 'hw/xwin')
-rw-r--r-- | hw/xwin/ChangeLog | 11 | ||||
-rw-r--r-- | hw/xwin/winmultiwindowwindow.c | 8 | ||||
-rwxr-xr-x | hw/xwin/winmultiwindowwndproc.c | 6 |
3 files changed, 23 insertions, 2 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog index 04b852f45..6f4e0977d 100644 --- a/hw/xwin/ChangeLog +++ b/hw/xwin/ChangeLog @@ -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> * winmultiwindowwndproc.c: diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index 28ef2f2f7..e9757a31d 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -611,6 +611,7 @@ winCreateWindowsWindow (WindowPtr pWin) } +Bool winInDestroyWindowsWindow = FALSE; /* * winDestroyWindowsWindow - Destroy a Windows window associated * with an X window @@ -625,6 +626,7 @@ winDestroyWindowsWindow (WindowPtr pWin) HMODULE hInstance; int iReturn; char pszClass[512]; + BOOL oldstate = winInDestroyWindowsWindow; #if CYGMULTIWINDOW_DEBUG ErrorF ("winDestroyWindowsWindow\n"); @@ -634,6 +636,8 @@ winDestroyWindowsWindow (WindowPtr pWin) if (pWinPriv->hWnd == NULL) return; + winInDestroyWindowsWindow = TRUE; + /* Store the info we need to destroy after this window is gone */ hInstance = (HINSTANCE) GetClassLong (pWinPriv->hWnd, GCL_HMODULE); 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 */ pWinPriv->hWnd = NULL; - + /* Process all messages on our queue */ while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) { @@ -672,6 +676,8 @@ winDestroyWindowsWindow (WindowPtr pWin) winDestroyIcon(hiconSmClass); } + winInDestroyWindowsWindow = oldstate; + #if CYGMULTIWINDOW_DEBUG ErrorF ("-winDestroyWindowsWindow\n"); #endif diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index 0254bb00a..398751122 100755 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -265,13 +265,17 @@ ValidateSizing (HWND hwnd, WindowPtr pWin, return TRUE; } +extern Bool winInDestroyWindowsWindow; static void winRaiseWindow(WindowPtr pWin) { + if (!winInDestroyWindowsWindow) + { /* Call configure window directly to make sure it gets processed * in time */ - XID vlist[1] = { 0 }; + XID vlist[1] = { 0 }; ConfigureWindow(pWin, CWStackMode, vlist, NULL); + } } |