From aa2ee0fde2dcd33795ce4d3904d6da21d4bb09e8 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 26 Jan 2012 08:27:33 +0100 Subject: Solved the problem of the WIN_WINDOW_PROP property being NULL in a window in another way --- xorg-server/hw/xwin/winmultiwindowwndproc.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'xorg-server/hw/xwin/winmultiwindowwndproc.c') 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: -- cgit v1.2.3