diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2017-04-22 22:10:17 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2017-04-22 22:10:17 +0100 |
commit | 26bdfbef35abeef37a5fc961326d215fcd3a91e0 (patch) | |
tree | 088dbdd762207ea4fe83b3c85e216e66c2ba2398 | |
parent | e8a972db4d8a87bb980683804f9fdb1361ccbb2a (diff) | |
parent | 4e6d8ceb884eb5ad533c86a759e8bdd4896f2002 (diff) |
Merge branch 'cygwin-patches-for-1.19' into cygwin-release-1.19xserver-cygwin-1.19.3-2
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 2 | ||||
-rw-r--r-- | hw/xwin/winmultiwindowwndproc.c | 25 |
2 files changed, 11 insertions, 16 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index 9069690aa..7f89bb7d0 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -1130,7 +1130,7 @@ winMultiWindowWMProc(void *pArg) } if (!neverFocus) - xcb_set_input_focus(pWMInfo->conn, XCB_INPUT_FOCUS_POINTER_ROOT, + xcb_set_input_focus(pWMInfo->conn, XCB_INPUT_FOCUS_PARENT, pNode->msg.iWindow, XCB_CURRENT_TIME); if (IsWmProtocolAvailable(pWMInfo, diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index 881746af5..1e0552b19 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -838,6 +838,16 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Add the keyboard hook if possible */ if (g_fKeyboardHookLL) g_fKeyboardHookLL = winInstallKeyboardHookLL(); + + /* Tell our Window Manager thread to activate the window */ + if (fWMMsgInitialized) + { + wmMsg.msg = WM_WM_ACTIVATE; + /* don't focus override redirect windows (e.g. menus) */ + if (!pWin || !pWin->overrideRedirect) + winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg); + } + return 0; case WM_KILLFOCUS: @@ -937,21 +947,6 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) /* Pass the message to the root window */ SendMessage(hwndScreen, message, wParam, lParam); - if (LOWORD(wParam) != WA_INACTIVE) { - /* Raise the window to the top in Z order */ - /* ago: Activate does not mean putting it to front! */ - /* - wmMsg.msg = WM_WM_RAISE; - if (fWMMsgInitialized) - winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg); - */ - - /* Tell our Window Manager thread to activate the window */ - wmMsg.msg = WM_WM_ACTIVATE; - if (fWMMsgInitialized) - if (!pWin || !pWin->overrideRedirect) /* for OOo menus */ - winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg); - } /* Prevent the mouse wheel from stalling when another window is minimized */ if (HIWORD(wParam) == 0 && LOWORD(wParam) == WA_ACTIVE && (HWND) lParam != NULL && (HWND) lParam != GetParent(hwnd)) |