From 0929decadd6b895ea9565651bdef969b20690190 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sat, 16 Apr 2005 11:57:19 +0000 Subject: [PATCH] Handle RDP recv queue even in RDP send queue is full. Patch from James Cameron This closes Debian Bug #246461. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@886 423420c4-83ab-492f-b58f-81f9feb106b5 --- xwin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xwin.c b/xwin.c index f91cc37..16d65d8 100644 --- a/xwin.c +++ b/xwin.c @@ -1341,7 +1341,7 @@ xwin_toggle_fullscreen(void) } } -/* 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 @@ xwin_process_events(void) 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);