From 7a4b1da166a484cd61cf36afa9c55062af80702a Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 27 May 2010 09:41:58 +0000 Subject: Do not call XSetInputFocus when the window is not realized yet because this will give an Xerror --- xorg-server/hw/xwin/winmultiwindowwndproc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xorg-server/hw') diff --git a/xorg-server/hw/xwin/winmultiwindowwndproc.c b/xorg-server/hw/xwin/winmultiwindowwndproc.c index ef5f3114a..3ddb071e4 100644 --- a/xorg-server/hw/xwin/winmultiwindowwndproc.c +++ b/xorg-server/hw/xwin/winmultiwindowwndproc.c @@ -789,9 +789,8 @@ winTopLevelWindowProc (HWND hwnd, UINT message, /* 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); + if (fWMMsgInitialized && pWin->realized && !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 && -- cgit v1.2.3