[vlc-commits] window: remove is_standalone flag

Rémi Denis-Courmont git at videolan.org
Sun Dec 2 19:00:30 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec  1 23:33:34 2018 +0200| [db617ae720c8f4253d2f5f02e605992926aad938] | committer: Rémi Denis-Courmont

window: remove is_standalone flag

The configuration is determined when the window is enabled, and this
flag must be known earlier than that, so it cannot be conveyed inside
the configuration.

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

 include/vlc_vout_window.h            | 2 --
 modules/gui/qt/qt.cpp                | 2 +-
 modules/gui/skins2/src/skin_main.cpp | 5 +++--
 src/video_output/display.c           | 1 -
 src/video_output/video_output.c      | 1 -
 5 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index 3c9f6073d6..36279d556d 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -94,8 +94,6 @@ typedef struct vout_window_mouse_event_t
 } vout_window_mouse_event_t;
 
 typedef struct vout_window_cfg_t {
-    /* If true, a standalone window is requested */
-    bool is_standalone;
     bool is_fullscreen;
     bool is_decorated;
 
diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
index a63453e1ea..4e8ceb5c66 100644
--- a/modules/gui/qt/qt.cpp
+++ b/modules/gui/qt/qt.cpp
@@ -691,7 +691,7 @@ static void ShowDialog( intf_thread_t *p_intf, int i_dialog_event, int i_arg,
  */
 static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
 {
-    if( cfg->is_standalone )
+    if( !var_InheritBool( p_wnd, "embedded-video" ) )
         return VLC_EGENERIC;
 
     intf_thread_t *p_intf =
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 284a0c9fc3..8a9d8053e1 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -372,7 +372,8 @@ static const struct vout_window_operations window_ops = {
 
 static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
 {
-    if( var_InheritBool( pWnd, "video-wallpaper" ) )
+    if( var_InheritBool( pWnd, "video-wallpaper" )
+     || !var_InheritBool( pWnd, "embedded-video" ) )
         return VLC_EGENERIC;
 
     vout_window_sys_t* sys;
@@ -384,7 +385,7 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
     if( pIntf == NULL )
         return VLC_EGENERIC;
 
-    if( !var_InheritBool( pIntf, "skinned-video") || cfg->is_standalone )
+    if( !var_InheritBool( pIntf, "skinned-video") )
         return VLC_EGENERIC;
 
     sys = new (std::nothrow) vout_window_sys_t;
diff --git a/src/video_output/display.c b/src/video_output/display.c
index ec6d0a0134..f420829925 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1231,7 +1231,6 @@ vout_display_t *vout_NewSplitter(vout_thread_t *vout,
         vout_window_cfg_t cfg = {
             .width = state->cfg.display.width,
             .height = state->cfg.display.height,
-            .is_standalone = true,
             .is_decorated = true,
         };
 
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index b04e449d97..c18ddd108e 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -171,7 +171,6 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
     /* Window */
     if (vout->p->splitter_name == NULL) {
         vout_window_cfg_t wcfg = {
-            .is_standalone = !var_InheritBool(vout, "embedded-video"),
             .is_fullscreen = var_GetBool(vout, "fullscreen"),
             .is_decorated = var_InheritBool(vout, "video-deco"),
             // TODO: take pixel A/R, crop and zoom into account



More information about the vlc-commits mailing list