]> git.sesse.net Git - vlc/blobdiff - modules/video_output/msw/common.c
Added CommonDisplay for msw.
[vlc] / modules / video_output / msw / common.c
index 83dac0b48f521e86b6bdeceb8ef82edc7b9c3820..5ff0f074850e9afd1bb7e20bfc5976507dc00fc8 100644 (file)
@@ -207,6 +207,30 @@ void CommonManage(vout_display_t *vd)
     EventThreadMouseAutoHide(sys->event);
 }
 
+/**
+ * It ensures that the video window is shown after the first picture
+ * is displayed.
+ */
+void CommonDisplay(vout_display_t *vd)
+{
+    vout_display_sys_t *sys = vd->sys;
+
+    if (!sys->is_first_display)
+        return;
+
+    /* Video window is initially hidden, show it now since we got a
+     * picture to show.
+     */
+    SetWindowPos(sys->hvideownd, 0, 0, 0, 0, 0,
+                 SWP_ASYNCWINDOWPOS|
+                 SWP_FRAMECHANGED|
+                 SWP_SHOWWINDOW|
+                 SWP_NOMOVE|
+                 SWP_NOSIZE|
+                 SWP_NOZORDER);
+    sys->is_first_display = false;
+}
+
 /*****************************************************************************
  * UpdateRects: update clipping rectangles
  *****************************************************************************