aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowwndproc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-26 08:27:33 +0100
committermarha <marha@users.sourceforge.net>2012-01-26 08:27:33 +0100
commitaa2ee0fde2dcd33795ce4d3904d6da21d4bb09e8 (patch)
tree78b22c148ae2fbd8a46cc56bf96aa5bfe4b1ec47 /xorg-server/hw/xwin/winmultiwindowwndproc.c
parentc32f68b81cd4897a450489b6adbdccd7273834c9 (diff)
downloadvcxsrv-aa2ee0fde2dcd33795ce4d3904d6da21d4bb09e8.tar.gz
vcxsrv-aa2ee0fde2dcd33795ce4d3904d6da21d4bb09e8.tar.bz2
vcxsrv-aa2ee0fde2dcd33795ce4d3904d6da21d4bb09e8.zip
Solved the problem of the WIN_WINDOW_PROP property being NULL in a window
in another way
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwndproc.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwndproc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c
index eb2b51020..f4313d353 100644
--- a/xorg-server/hw/xwin/winmultiwindowwndproc.c
+++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c
@@ -363,10 +363,12 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
fWMMsgInitialized = TRUE;
}
+ #ifdef _DEBUG
else if (message!=WM_CREATE)
- { // Avoid crashes when pWin == NULL, which happens sometimes (I think during closing of windows)
- return DefWindowProc (hwnd, message, wParam, lParam);
+ {
+ ErrorLog("Error; WIN_WINDOW_PROP should be different from NULL\n");
}
+ #endif
/* Branch on message type */
switch (message)
@@ -699,9 +701,10 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
/* Remove our keyboard hook if it is installed */
winRemoveKeyboardHookLL ();
+ /* Revert the X focus as well, but only if the Windows focus is going to another window */
if (!wParam)
- /* Revert the X focus as well, but only if the Windows focus is going to another window */
- DeleteWindowFromAnyEvents(pWin, FALSE);
+ if (pWin)
+ DeleteWindowFromAnyEvents(pWin, FALSE);
return 0;
case WM_SYSDEADCHAR: