[MPlayer-cvslog] r36165 - trunk/gui/dialog/dialog.c

ib subversion at mplayerhq.hu
Fri Apr 5 14:41:49 CEST 2013


Author: ib
Date: Fri Apr  5 14:41:49 2013
New Revision: 36165

Log:
Revise gtkEvents().

Check for pending events instead of blindly iterating the mainloop
an arbitrary number of times.

Additionally, add doxygen comment.

Modified:
   trunk/gui/dialog/dialog.c

Modified: trunk/gui/dialog/dialog.c
==============================================================================
--- trunk/gui/dialog/dialog.c	Fri Apr  5 14:40:24 2013	(r36164)
+++ trunk/gui/dialog/dialog.c	Fri Apr  5 14:41:49 2013	(r36165)
@@ -168,12 +168,13 @@ void gtkAddIcon(GtkWidget *window)
     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 */


More information about the MPlayer-cvslog mailing list