[vlc-commits] display: do not use is_fullscreen at start

Rémi Denis-Courmont git at videolan.org
Mon Dec 31 17:40:23 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Dec 30 21:38:18 2018 +0200| [ed1df36130d970e6dee33e7b34c362425e54494b] | committer: Rémi Denis-Courmont

display: do not use is_fullscreen at start

Just send the legacy fullscreen event right after probing if necessary.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed1df36130d970e6dee33e7b34c362425e54494b
---

 modules/video_output/kva.c          |  4 ----
 modules/video_output/win32/common.c |  5 -----
 src/video_output/display.c          | 10 ++++++----
 src/video_output/video_output.c     |  4 ----
 4 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index f319ccee2e..99636ce611 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -262,10 +262,6 @@ static void PMThread( void *arg )
         goto exit_open_display;
     }
 
-    if( cfg->is_fullscreen && !sys->parent_window )
-        WinPostMsg( sys->client, WM_VLC_FULLSCREEN_CHANGE,
-                    MPFROMLONG( true ), 0 );
-
     kvaDisableScreenSaver();
 
     /* Setup vout_display now that everything is fine */
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index e99f4a4d2e..e228df7a64 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -130,11 +130,6 @@ int CommonInit(vout_display_t *vd, bool b_windowless, const vout_display_cfg_t *
     sys->hvideownd     = hwnd.hvideownd;
     sys->hfswnd        = hwnd.hfswnd;
 
-    if (vdcfg->is_fullscreen) {
-        if (CommonControlSetFullscreen(vd, true))
-            vout_display_SendEventFullscreen(vd, false);
-    }
-
 #endif /* !VLC_WINSTORE_APP */
 
     return VLC_SUCCESS;
diff --git a/src/video_output/display.c b/src/video_output/display.c
index cd0521a315..2f017ffcab 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -937,10 +937,6 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
 
     vlc_mouse_Init(&osys->mouse.state);
 
-#if defined(_WIN32) || defined(__OS2__)
-    osys->is_fullscreen  = osys->cfg.is_fullscreen;
-#endif
-
     osys->source = *source;
     osys->crop.left   = 0;
     osys->crop.top    = 0;
@@ -973,6 +969,12 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
                             osys->cfg.display.width, osys->cfg.display.height);
 
 #if defined(_WIN32) || defined(__OS2__)
+        if ((var_GetBool(vout, "fullscreen")
+          || var_GetBool(vout, "video-wallpaper"))
+         && vout_display_Control(vd, VOUT_DISPLAY_CHANGE_FULLSCREEN,
+                                 true) == VLC_SUCCESS)
+            osys->cfg.is_fullscreen = true;
+
         if (var_InheritBool(vout, "video-on-top"))
             vout_display_Control(vd, VOUT_DISPLAY_CHANGE_WINDOW_STATE,
                                  (unsigned)VOUT_WINDOW_STATE_ABOVE);
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index eae33a6c31..de0cf4e3bc 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -654,10 +654,6 @@ static void VoutGetDisplayCfg(vout_thread_t *vout, vout_display_cfg_t *cfg)
 {
     /* Load configuration */
     cfg->window = vout->p->window;
-#if defined(_WIN32) || defined(__OS2__)
-    cfg->is_fullscreen = var_GetBool(vout, "fullscreen")
-                         || var_GetBool(vout, "video-wallpaper");
-#endif
     cfg->viewpoint = vout->p->original.pose;
 
     const int display_width = var_GetInteger(vout, "width");



More information about the vlc-commits mailing list