[vlc-commits] window: handle fullscreen state at initialization

Rémi Denis-Courmont git at videolan.org
Thu Oct 29 21:38:55 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 29 22:08:11 2015 +0200| [c41b9606887e57aa4761a5bfe7fc2050ec702969] | committer: Rémi Denis-Courmont

window: handle fullscreen state at initialization

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

 include/vlc_vout_window.h                    |    7 ++++---
 modules/gui/macosx/VLCVoutWindowController.m |    4 ++--
 modules/gui/minimal_macosx/intf.m            |    1 +
 modules/gui/qt4/qt4.cpp                      |    1 +
 modules/gui/skins2/src/skin_main.cpp         |    1 +
 modules/video_output/wayland/shell_surface.c |    1 +
 modules/video_output/xcb/window.c            |    1 +
 7 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index 44201d6..63351ba 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -65,12 +65,13 @@ enum {
 };
 
 typedef struct vout_window_cfg_t {
-    /* If true, a standalone window is requested */
-    bool is_standalone;
-
     /* Window handle type */
     unsigned type;
 
+    /* If true, a standalone window is requested */
+    bool is_standalone;
+    bool is_fullscreen;
+
 #ifdef __APPLE__
     /* Window position hint */
     int x;
diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index bbd1a84..7699104 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -87,9 +87,9 @@ int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
 
         p_wnd->type = VOUT_WINDOW_TYPE_NSOBJECT;
         p_wnd->control = WindowControl;
-
-        return VLC_SUCCESS;
     }
+    vout_window_SetFullScreen(p_wnd, cfg->is_fullscreen);
+    return VLC_SUCCESS;
 }
 
 static int WindowControl(vout_window_t *p_wnd, int i_query, va_list args)
diff --git a/modules/gui/minimal_macosx/intf.m b/modules/gui/minimal_macosx/intf.m
index b803a9f..26c16bd 100644
--- a/modules/gui/minimal_macosx/intf.m
+++ b/modules/gui/minimal_macosx/intf.m
@@ -130,6 +130,7 @@ int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
         p_wnd->control = WindowControl;
     }
 
+    vout_window_SetFullScreen(p_wnd, cfg->is_fullscreen);
     return VLC_SUCCESS;
 }
 
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 7b0b795..2bb6d24 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -713,6 +713,7 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
 
     p_wnd->control = WindowControl;
     p_wnd->sys = (vout_window_sys_t*)p_mi;
+    emit p_mi->askVideoSetFullScreen( cfg->is_fullscreen );
     return VLC_SUCCESS;
 }
 
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 2fbf3ba..0d2c2a2 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -408,6 +408,7 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
         return VLC_EGENERIC;
     }
 
+    vout_window_SetFullScreen( pWnd, cfg->is_fullscreen );
     return VLC_SUCCESS;
 }
 
diff --git a/modules/video_output/wayland/shell_surface.c b/modules/video_output/wayland/shell_surface.c
index 4ebdcff..c91476e 100644
--- a/modules/video_output/wayland/shell_surface.c
+++ b/modules/video_output/wayland/shell_surface.c
@@ -362,6 +362,7 @@ static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
         goto error;
 
     vout_window_ReportSize(wnd, cfg->width, cfg->height);
+    vout_window_SetFullScreen(wnd, cfg->is_fullscreen);
     return VLC_SUCCESS;
 
 error:
diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index 91a7096..cfe6cd6 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -348,6 +348,7 @@ static int Open (vout_window_t *wnd, const vout_window_cfg_t *cfg)
     }
 
     xcb_flush (conn); /* Make sure map_window is sent (should be useless) */
+    vout_window_SetFullScreen (wnd, cfg->is_fullscreen);
     return VLC_SUCCESS;
 
 error:



More information about the vlc-commits mailing list