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:
parent
b120a50f44
commit
061f44532b
8
xwin.c
8
xwin.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user