Need to wait for visibility before calling XSetInputFocus

(pointed out by Jay).


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@207 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Matt Chapman 2002-09-27 01:04:34 +00:00
parent b120a50f44
commit 061f44532b

8
xwin.c
View File

@ -345,7 +345,7 @@ ui_create_window(void)
}
input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask |
StructureNotifyMask | FocusChangeMask;
VisibilityChangeMask | FocusChangeMask;
if (sendmotion)
input_mask |= PointerMotionMask;
@ -365,12 +365,12 @@ ui_create_window(void)
XSelectInput(display, wnd, input_mask);
XMapWindow(display, wnd);
/* wait for MapNotify */
/* wait for VisibilityNotify */
do
{
XMaskEvent(display, StructureNotifyMask, &xevent);
XMaskEvent(display, VisibilityChangeMask, &xevent);
}
while (xevent.type != MapNotify);
while (xevent.type != VisibilityNotify);
if (fullscreen)
XSetInputFocus(display, wnd, RevertToPointerRoot, CurrentTime);