[vlc-commits] vout: correctly ignore VOUT_WINDOW_SET_FULLSCREEN result
Rémi Denis-Courmont
git at videolan.org
Sun May 20 19:51:59 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 19 13:24:14 2018 +0300| [cbb50db4d17c5306944388cf7a55ec06b7579dcb] | committer: Rémi Denis-Courmont
vout: correctly ignore VOUT_WINDOW_SET_FULLSCREEN result
Also document the result value better.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cbb50db4d17c5306944388cf7a55ec06b7579dcb
---
include/vlc_vout_window.h | 9 ++++++++-
src/video_output/video_output.c | 10 +++-------
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index d42e9868ba..d4644c3a43 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -270,7 +270,14 @@ static inline int vout_window_SetSize(vout_window_t *window,
}
/**
- * Sets fullscreen mode.
+ * Requests fullscreen mode.
+ *
+ * \param full true to request full screen, false to request window mode
+ *
+ * \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, bool full)
{
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 6acaa95d75..a7e96ce24a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1352,17 +1352,13 @@ static void ThreadChangeFullscreen(vout_thread_t *vout, bool fullscreen)
{
vout_window_t *window = vout->p->window;
-#if !defined(_WIN32) && !defined(__OS2__)
if (window != NULL)
vout_window_SetFullScreen(window, fullscreen);
-#else
- bool window_fullscreen = false;
- if (window != NULL
- && vout_window_SetFullScreen(window, fullscreen) == VLC_SUCCESS)
- window_fullscreen = true;
+#if defined(_WIN32) || defined(__OS2__)
/* FIXME: remove this event */
if (vout->p->display.vd != NULL)
- vout_display_SendEventFullscreen(vout->p->display.vd, fullscreen, window_fullscreen);
+ vout_display_SendEventFullscreen(vout->p->display.vd, fullscreen,
+ window != NULL);
#endif
}
More information about the vlc-commits
mailing list