--- sourceforge.net/trunk/rdesktop/xwin.c 2005/03/23 12:25:54 867 +++ sourceforge.net/trunk/rdesktop/xwin.c 2005/04/16 11:57:19 887 @@ -1341,7 +1341,7 @@ } } -/* Process all events in Xlib queue +/* Process events in Xlib queue Returns 0 after user quit, 1 otherwise */ static int xwin_process_events(void) @@ -1353,8 +1353,9 @@ key_translation tr; char str[256]; Status status; + int events = 0; - while (XPending(g_display) > 0) + while ((XPending(g_display) > 0) && events++ < 20) { XNextEvent(g_display, &xevent);