--- sourceforge.net/trunk/rdesktop/xwin.c 2002/09/26 14:10:30 204 +++ sourceforge.net/trunk/rdesktop/xwin.c 2002/09/27 01:04:34 208 @@ -1,7 +1,7 @@ /* rdesktop: A Remote Desktop Protocol client. User interface services - X Window System - Copyright (C) Matthew Chapman 1999-2001 + Copyright (C) Matthew Chapman 1999-2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -345,7 +345,7 @@ } input_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | - StructureNotifyMask | FocusChangeMask; + VisibilityChangeMask | FocusChangeMask; if (sendmotion) input_mask |= PointerMotionMask; @@ -365,12 +365,12 @@ 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);