# HG changeset patch # User youngs # Date 1034052608 0 # Node ID 5323022ae86359d85d5b020f565cbc4e89b099a2 # Parent a97af4f94589e54be13433bd83590a15b049dea0 [xemacs-hg @ 2002-10-08 04:50:00 by youngs] 2002-08-20 Ben Sigelman * event-Xt.c (drain_X_queue): loop over while(XEventsQueued()) instead of while(XtAppPending()&XtIMXEvent). Upon a gdm logout, the xemacs process did not exit, but looped infinitely here. This fixes that problem. diff -r a97af4f94589 -r 5323022ae863 src/ChangeLog --- a/src/ChangeLog Tue Oct 08 03:45:12 2002 +0000 +++ b/src/ChangeLog Tue Oct 08 04:50:08 2002 +0000 @@ -1,3 +1,10 @@ +2002-08-20 Ben Sigelman + + * event-Xt.c (drain_X_queue): loop over while(XEventsQueued()) + instead of while(XtAppPending()&XtIMXEvent). Upon a gdm logout, + the xemacs process did not exit, but looped infinitely here. This + fixes that problem. + 2002-10-04 Stephen J. Turnbull * regex.c (re_match_2_internal): Declare num_nonshy_regs in diff -r a97af4f94589 -r 5323022ae863 src/event-Xt.c --- a/src/event-Xt.c Tue Oct 08 03:45:12 2002 +0000 +++ b/src/event-Xt.c Tue Oct 08 04:50:08 2002 +0000 @@ -3146,8 +3146,29 @@ static void drain_X_queue (void) { + Lisp_Object devcons, concons; + CONSOLE_LOOP (concons) + { + struct console *con = XCONSOLE (XCAR (concons)); + if (!con->input_enabled) + continue; + + CONSOLE_DEVICE_LOOP (devcons, con) + { + struct device* d; + Display* display; + d = XDEVICE (XCAR (devcons)); + if (DEVICE_X_P (d) && DEVICE_X_DISPLAY (d)) { + display = DEVICE_X_DISPLAY (d); + while (XEventsQueued (display, QueuedAfterReading)) + XtAppProcessEvent (Xt_app_con, XtIMXEvent); + } + } + } + /* while (XtAppPending (Xt_app_con) & XtIMXEvent) XtAppProcessEvent (Xt_app_con, XtIMXEvent); + */ } static int