Skip to content
Open
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
25 changes: 10 additions & 15 deletions hw/xwin/winmultiwindowwndproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,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:
Expand Down Expand Up @@ -897,21 +907,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))
Expand Down
Loading