From 4d755143216e4d8dec22b4918c1dd290a5efe814 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 30 Aug 2016 23:52:16 +0200 Subject: vo: change messy handling of fullscreen and other flags Before this commit, all VOs had to toggle the option flag themselves, now command.c does it. I can't really comprehend why it required every VO to do this manually. Maybe it was for rejecting the property/option change if the VO didn't support a specific capability. But then it could have checked the VOCTRL result. In any case, I don't care, and successfully changing the property without doing anything (With some VOs) is fine too. Many things work this way now, and it's simpler overall. This change will be useful for cleaning up VO option handling. --- video/out/wayland_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video/out/wayland_common.c') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index e42af8438e..480f29638b 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -957,8 +957,9 @@ void vo_wayland_uninit(struct vo *vo) static void vo_wayland_ontop(struct vo *vo) { struct vo_wayland_state *wl = vo->wayland; + if (!vo->opts->ontop) + return; MP_DBG(wl, "going ontop\n"); - vo->opts->ontop = 1; window_set_toplevel(wl); schedule_resize(wl, 0, wl->window.width, wl->window.height); } @@ -1046,7 +1047,6 @@ int vo_wayland_control(struct vo *vo, int *events, int request, void *arg) wl->window.events = 0; return VO_TRUE; case VOCTRL_FULLSCREEN: - vo->opts->fullscreen = !vo->opts->fullscreen; vo_wayland_fullscreen(vo); return VO_TRUE; case VOCTRL_ONTOP: -- cgit v1.2.3