diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c index 2329d163e..aabde6b4a 100644 --- a/hw/xwin/winmultiwindowwindow.c +++ b/hw/xwin/winmultiwindowwindow.c @@ -638,8 +638,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/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index 1d57a5182..19dad579c 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -713,9 +713,11 @@ winTopLevelWindowProc (HWND hwnd, UINT message, /* Remove our keyboard hook if it is installed */ winRemoveKeyboardHookLL (); - if (!wParam) - /* Revert the X focus as well, but only if the Windows focus is going to another window */ - DeleteWindowFromAnyEvents(pWin, FALSE); + + /* Revert the X focus as well, but only if the Windows focus is going to another window */ + if (!wParam && pWin) + DeleteWindowFromAnyEvents(pWin, FALSE); + return 0; case WM_SYSDEADCHAR: