[vlc-commits] window: track fullscreen state internally
Rémi Denis-Courmont
git at videolan.org
Sat Apr 13 18:23:14 CEST 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 30 14:58:23 2019 +0200| [f006e73db27773659958dcc42cc95713a5b25b0c] | committer: Rémi Denis-Courmont
window: track fullscreen state internally
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f006e73db27773659958dcc42cc95713a5b25b0c
---
src/video_output/window.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/video_output/window.c b/src/video_output/window.c
index 3eba9d8344..78949433b6 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -41,6 +41,7 @@ typedef struct
vout_window_t wnd;
module_t *module;
vlc_inhibit_t *inhibit;
+ bool fullscreen;
} window_t;
static int vout_window_start(void *func, bool forced, va_list ap)
@@ -66,6 +67,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj, const char *module,
window->sys = NULL;
assert(owner != NULL);
window->owner = *owner;
+ w->fullscreen = false;
w->module = vlc_module_load(window, "vout window", module, false,
vout_window_start, window);
@@ -129,12 +131,20 @@ void vout_window_SetInhibition(vout_window_t *window, bool enabled)
void vout_window_ReportWindowed(vout_window_t *window)
{
+ window_t *w = container_of(window, window_t, wnd);
+
+ w->fullscreen = false;
+
if (window->owner.cbs->windowed != NULL)
window->owner.cbs->windowed(window);
}
void vout_window_ReportFullscreen(vout_window_t *window, const char *id)
{
+ window_t *w = container_of(window, window_t, wnd);
+
+ w->fullscreen = true;
+
if (window->owner.cbs->fullscreened != NULL)
window->owner.cbs->fullscreened(window, id);
}
More information about the vlc-commits
mailing list