for (dpyinfo = x_display_list; dpyinfo;
dpyinfo = dpyinfo->next)
{
+#ifndef USE_GTK
if (XPending (dpyinfo->display))
{
EVENT_INIT (hold_quit);
if (!NILP (XCAR (cell)))
return;
}
+#endif
fd = XConnectionNumber (dpyinfo->display);
FD_SET (XConnectionNumber (dpyinfo->display), &fds);
}
+ /* Prevent events from being lost (from GTK's point of view) by
+ using GDK to run the event loop. */
+#ifdef USE_GTK
+ while (gtk_events_pending ())
+ {
+ EVENT_INIT (hold_quit);
+ current_count = 0;
+ current_hold_quit = &hold_quit;
+ current_finish = X_EVENT_NORMAL;
+
+ gtk_main_iteration ();
+
+ current_count = -1;
+ current_hold_quit = NULL;
+
+ /* Make us quit now. */
+ if (hold_quit.kind != NO_EVENT)
+ kbd_buffer_store_event (&hold_quit);
+
+ if (!NILP (XCAR (cell)))
+ return;
+
+ if (current_finish == X_EVENT_GOTO_OUT)
+ break;
+ }
+#endif
+
eassert (maxfd >= 0);
current = current_timespec ();