diff options
-rw-r--r-- | hw/xwin/glx/indirect.c | 2 | ||||
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 10 | ||||
-rw-r--r-- | hw/xwin/winmultiwindowwndproc.c | 35 |
3 files changed, 20 insertions, 27 deletions
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index 33b82eaf7..4948807d9 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -2369,7 +2369,7 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen, PixelFormatRejectStats * if (layers > 0) { ErrorF - ("pixelFormat %d: has %d overlay, %d underlays which aren't currently handled", + ("pixelFormat %d: has %d overlay, %d underlays which aren't currently handled\n", i, ATTR_VALUE(WGL_NUMBER_OVERLAYS_ARB, 0), ATTR_VALUE(WGL_NUMBER_UNDERLAYS_ARB, 0)); // XXX: need to iterate over layers? diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index 7f89bb7d0..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; @@ -1130,7 +1129,7 @@ winMultiWindowWMProc(void *pArg) } if (!neverFocus) - xcb_set_input_focus(pWMInfo->conn, XCB_INPUT_FOCUS_PARENT, + xcb_set_input_focus(pWMInfo->conn, XCB_INPUT_FOCUS_POINTER_ROOT, pNode->msg.iWindow, XCB_CURRENT_TIME); if (IsWmProtocolAvailable(pWMInfo, @@ -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 1e0552b19..ee3d1637e 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -838,16 +838,6 @@ 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: @@ -857,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; @@ -947,6 +933,21 @@ 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)) |