diff options
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 8 | ||||
-rw-r--r-- | hw/xwin/winmultiwindowwndproc.c | 10 |
2 files changed, 3 insertions, 15 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index 9069690aa..f3ccfb2fc 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -1116,7 +1116,6 @@ winMultiWindowWMProc(void *pArg) -- independently, the WM_TAKE_FOCUS protocol determines whether the WM should send a WM_TAKE_FOCUS ClientMessage. */ - if (pNode->msg.iWindow) { Bool neverFocus = FALSE; xcb_get_property_cookie_t cookie; @@ -1141,13 +1140,6 @@ winMultiWindowWMProc(void *pArg) pWMInfo->atmWmProtos, pWMInfo->atmWmTakeFocus); } - else - /* Set the input focus to none */ - { - xcb_set_input_focus(pWMInfo->conn, XCB_INPUT_FOCUS_NONE, - XCB_INPUT_FOCUS_NONE, XCB_CURRENT_TIME); - - } break; case WM_WM_NAME_EVENT: diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index 881746af5..ee3d1637e 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -847,13 +847,9 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Remove our keyboard hook if it is installed */ winRemoveKeyboardHookLL(); - /* Revert the X focus as well */ - if (fWMMsgInitialized) - { - wmMsg.msg = WM_WM_ACTIVATE; - wmMsg.iWindow = 0; - winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg); - } + /* 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; |