[vlc-commits] window: add string to identify fullscreen output

Rémi Denis-Courmont git at videolan.org
Sun May 20 19:52:26 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 19 21:30:43 2018 +0300| [a92d3126944628f34938f5b3846e45bcdeae6c82] | committer: Rémi Denis-Courmont

window: add string to identify fullscreen output

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

 include/vlc_vout_window.h                    | 7 +++++--
 modules/gui/macosx/VLCVoutWindowController.m | 2 +-
 modules/gui/minimal_macosx/intf.m            | 2 +-
 modules/gui/skins2/src/skin_main.cpp         | 2 +-
 modules/video_output/wayland/shell.c         | 2 +-
 modules/video_output/wayland/xdg-shell.c     | 2 +-
 src/video_output/video_output.c              | 6 ++++--
 7 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index c870288ea1..beee306fb3 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -274,14 +274,17 @@ static inline int vout_window_SetSize(vout_window_t *window,
 /**
  * Requests fullscreen mode.
  *
+ * \param id nul-terminated output identifier, NULL for default
+ *
  * \retval VLC_SUCCESS The request has been queued to the windowing system
  * (that does <b>not</b> imply that the request is complete nor succesful).
  * \retval VLC_EGENERIC The request could not be queued, e.g. the back-end does
  * not implement toggling between fullscreen and windowed modes.
  */
-static inline int vout_window_SetFullScreen(vout_window_t *window)
+static inline int vout_window_SetFullScreen(vout_window_t *window,
+                                            const char *id)
 {
-    return vout_window_Control(window, VOUT_WINDOW_SET_FULLSCREEN);
+    return vout_window_Control(window, VOUT_WINDOW_SET_FULLSCREEN, id);
 }
 
 /**
diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index b5b1322816..d1d90085de 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -77,7 +77,7 @@ int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
         p_wnd->control = WindowControl;
     }
     if (cfg->is_fullscreen)
-        vout_window_SetFullScreen(p_wnd);
+        vout_window_SetFullScreen(p_wnd, NULL);
     return VLC_SUCCESS;
 }
 
diff --git a/modules/gui/minimal_macosx/intf.m b/modules/gui/minimal_macosx/intf.m
index 6d648cd626..beb503af21 100644
--- a/modules/gui/minimal_macosx/intf.m
+++ b/modules/gui/minimal_macosx/intf.m
@@ -123,7 +123,7 @@ int WindowOpen(vout_window_t *p_wnd, const vout_window_cfg_t *cfg)
     }
 
     if (cfg->is_fullscreen)
-        vout_window_SetFullScreen(p_wnd);
+        vout_window_SetFullScreen(p_wnd, NULL);
     return VLC_SUCCESS;
 }
 
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index cab637fc7f..9a015006e4 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -401,7 +401,7 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
     }
 
     if (cfg->is_fullscreen)
-        vout_window_SetFullScreen( pWnd );
+        vout_window_SetFullScreen( pWnd, NULL );
     return VLC_SUCCESS;
 }
 
diff --git a/modules/video_output/wayland/shell.c b/modules/video_output/wayland/shell.c
index 76db2695a9..f9bd528326 100644
--- a/modules/video_output/wayland/shell.c
+++ b/modules/video_output/wayland/shell.c
@@ -297,7 +297,7 @@ static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
 
     vout_window_ReportSize(wnd, cfg->width, cfg->height);
     if (cfg->is_fullscreen)
-        vout_window_SetFullScreen(wnd);
+        vout_window_SetFullScreen(wnd, NULL);
     return VLC_SUCCESS;
 
 error:
diff --git a/modules/video_output/wayland/xdg-shell.c b/modules/video_output/wayland/xdg-shell.c
index e1d2aa9f9b..5b16f28504 100644
--- a/modules/video_output/wayland/xdg-shell.c
+++ b/modules/video_output/wayland/xdg-shell.c
@@ -379,7 +379,7 @@ static int Open(vout_window_t *wnd, const vout_window_cfg_t *cfg)
     wnd->control = Control;
 
     if (cfg->is_fullscreen)
-        vout_window_SetFullScreen(wnd);
+        vout_window_SetFullScreen(wnd, NULL);
 
     if (vlc_clone(&sys->thread, Thread, wnd, VLC_THREAD_PRIORITY_LOW))
         goto error;
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index bc59f5a8e1..4e53ac5a62 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1345,8 +1345,10 @@ static void ThreadChangeFullscreen(vout_thread_t *vout, bool fullscreen)
     if (window == NULL)
         return; /* splitter! */
 
-    (fullscreen ? vout_window_SetFullScreen
-                : vout_window_UnsetFullScreen)(window);
+    if (fullscreen)
+        vout_window_SetFullScreen(window, NULL);
+    else
+        vout_window_UnsetFullScreen(window);
 }
 
 static void ThreadChangeWindowState(vout_thread_t *vout, unsigned state)



More information about the vlc-commits mailing list