summaryrefslogtreecommitdiff
path: root/hw/xwin/winmultiwindowwndproc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwin/winmultiwindowwndproc.c')
-rw-r--r--hw/xwin/winmultiwindowwndproc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 4863c080f..b3b295b4a 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -672,6 +672,9 @@ 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);
return 0;
case WM_SYSDEADCHAR: