changeset 36292:d626e6b9fbc3

Add a redraw and event handling to GUI_PREPARE. It may take some time until MPlayer will call a GUI_REDRAW after the GUI_PREPARE, which will result in windows being exposed with unhandled events waiting. This way, windows will be redrawn earlier which looks nicer.
author ib
date Thu, 01 Aug 2013 17:34:54 +0000
parents b2edfe1a11a6
children c74ca4ce7103
files gui/interface.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Thu Aug 01 17:29:47 2013 +0000
+++ b/gui/interface.c	Thu Aug 01 17:34:54 2013 +0000
@@ -52,6 +52,7 @@
 #include "libmpcodecs/vf.h"
 #include "libvo/video_out.h"
 #include "libvo/x11_common.h"
+#include "osdep/timer.h"
 #ifdef CONFIG_DVDREAD
 #include "stream/stream_dvd.h"
 #endif
@@ -382,7 +383,10 @@
 
     case GUI_PREPARE:
 
+        uiEvent(ivRedraw, True);
         wsMouseVisibility(&guiApp.videoWindow, wsHideMouseCursor);
+        usec_sleep(20000);
+        wsEvents();
 
         if (guiInfo.NewPlay == GUI_FILE_NEW) {
             audio_id  = -1;