changeset 36294:a73127c786e8

Remove GUI_HANDLE_EVENTS. This call is only needed after a GUI_REDRAW, so add its code to GUI_REDRAW and simplify the GUI interface.
author ib
date Thu, 01 Aug 2013 17:45:31 +0000
parents c74ca4ce7103
children 0bd0297b073a
files gui/interface.c gui/interface.h gui/win32/interface.c mplayer.c
diffstat 4 files changed, 3 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Thu Aug 01 17:36:21 2013 +0000
+++ b/gui/interface.c	Thu Aug 01 17:45:31 2013 +0000
@@ -332,7 +332,9 @@
         uiState();
         break;
 
-    case GUI_HANDLE_EVENTS:
+    case GUI_REDRAW:
+
+        uiEvent(ivRedraw, 0);
 
         if (!guiInfo.Playing || !guiInfo.VideoWindow)
             wsEvents();
@@ -735,11 +737,6 @@
 
         break;
 
-    case GUI_REDRAW:
-
-        uiEvent(ivRedraw, 0);
-        break;
-
     case GUI_SETUP_VIDEO_WINDOW:
 
         guiInfo.VideoWidth  = vo_dwidth;
--- a/gui/interface.h	Thu Aug 01 17:36:21 2013 +0000
+++ b/gui/interface.h	Thu Aug 01 17:45:31 2013 +0000
@@ -40,7 +40,6 @@
 /// gui() instructions
 enum {
     GUI_END_FILE,
-    GUI_HANDLE_EVENTS,
     GUI_HANDLE_X_EVENT,
     GUI_PREPARE,
     GUI_REDRAW,
--- a/gui/win32/interface.c	Thu Aug 01 17:36:21 2013 +0000
+++ b/gui/win32/interface.c	Thu Aug 01 17:45:31 2013 +0000
@@ -743,8 +743,6 @@
         }
         case GUI_RUN_MESSAGE:
           break;
-        case GUI_HANDLE_EVENTS:
-          break;
         case GUI_SET_MIXER:
         {
             if(audio_out)
--- a/mplayer.c	Thu Aug 01 17:36:21 2013 +0000
+++ b/mplayer.c	Thu Aug 01 17:45:31 2013 +0000
@@ -2565,7 +2565,6 @@
 #ifdef CONFIG_GUI
         if (use_gui) {
             gui(GUI_REDRAW, 0);
-            gui(GUI_HANDLE_EVENTS, 0);
             if (guiInfo.Playing != GUI_PAUSE || (rel_seek_secs || abs_seek_pos))
                 break;
         }
@@ -3096,7 +3095,6 @@
             mp_cmd_t *cmd;
             usec_sleep(20000);
             gui(GUI_REDRAW, 0);
-            gui(GUI_HANDLE_EVENTS, 0);
             if ((cmd = mp_input_get_cmd(0, 0, 0)) != NULL) {
                 if (cmd->id == MP_CMD_GUI)
                     gui(GUI_RUN_MESSAGE, cmd->args[0].v.s);
@@ -4009,7 +4007,6 @@
                 guiInfo.RunningTime = demuxer_get_time_length(mpctx->demuxer);
                 gui(GUI_SET_MIXER, 0);
                 gui(GUI_REDRAW, 0);
-                gui(GUI_HANDLE_EVENTS, 0);
                 if (guiInfo.Playing == GUI_STOP)
                     break;                  // STOP
                 if (guiInfo.Playing == GUI_PAUSE)