aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwindow.c2
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwndproc.c11
2 files changed, 7 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c
index f87da410e..836587f74 100644
--- a/xorg-server/hw/xwin/winmultiwindowwindow.c
+++ b/xorg-server/hw/xwin/winmultiwindowwindow.c
@@ -611,8 +611,6 @@ winDestroyWindowsWindow (WindowPtr pWin)
hIcon = (HICON)SendMessage(pWinPriv->hWnd, WM_GETICON, ICON_BIG, 0);
hIconSm = (HICON)SendMessage(pWinPriv->hWnd, WM_GETICON, ICON_SMALL, 0);
- SetProp (pWinPriv->hWnd, WIN_WINDOW_PROP, NULL);
-
/* Destroy the Windows window */
DestroyWindow (pWinPriv->hWnd);
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: