Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions hw/xwin/winmultiwindowwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,7 @@ 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;
Expand All @@ -931,6 +932,13 @@ winMultiWindowWMProc(void *pArg)
pNode->msg.iWindow,
pWMInfo->atmWmProtos, pWMInfo->atmWmTakeFocus);

}
else
/* Set the input focus to none */
{
xcb_set_input_focus(pWMInfo->conn, XCB_INPUT_FOCUS_NONE,
XCB_NONE, XCB_CURRENT_TIME);

}
break;

Expand Down
10 changes: 7 additions & 3 deletions hw/xwin/winmultiwindowwndproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,9 +811,13 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
/* 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 && pWin)
DeleteWindowFromAnyEvents(pWin, FALSE);
/* Revert the X focus as well */
if (fWMMsgInitialized)
{
wmMsg.msg = WM_WM_ACTIVATE;
wmMsg.iWindow = 0;
winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg);
}

return 0;

Expand Down
Loading