changeset 36071:989b5d955703

Revise gtkEvents(). Check for pending events instead of blindly iterating the mainloop an arbitrary number of times. Additionally, add doxygen comment.
author ib
date Fri, 05 Apr 2013 12:41:49 +0000
parents 6c3dc8fec01f
children 506cefd8a5f0
files gui/dialog/dialog.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gui/dialog/dialog.c	Fri Apr 05 12:40:24 2013 +0000
+++ b/gui/dialog/dialog.c	Fri Apr 05 12:41:49 2013 +0000
@@ -168,12 +168,13 @@
     wsWindowIcon(gdk_display, GDK_WINDOW_XWINDOW(window->window), &guiIcon);
 }
 
+/**
+ * @brief Process all pending events.
+ */
 void gtkEvents(void)
 {
-    int i;
-
-    for (i = 0; i < 25; i++)
-        gtk_main_iteration_do(0);
+    while (gtk_events_pending())
+        gtk_main_iteration();
 }
 
 /* funcs */