diff options
author | Alexander Preisinger <alexander.preisinger@gmail.com> | 2014-01-04 13:57:47 +0100 |
---|---|---|
committer | Alexander Preisinger <alexander.preisinger@gmail.com> | 2014-01-04 13:57:47 +0100 |
commit | 340ab6cd724af8ac8d43890bb49a47f9ec04d04c (patch) | |
tree | 27ae07010644476e8bcc496d710a6cf60ca166d8 /video/out/wayland_common.c | |
parent | 8f241998c03938b3c159f54c9a87c928808f19f9 (diff) | |
download | mpv-340ab6cd724af8ac8d43890bb49a47f9ec04d04c.tar.bz2 mpv-340ab6cd724af8ac8d43890bb49a47f9ec04d04c.tar.xz |
wayland: move workaround to fullscreen code
Because of this workaround there was a bug in the wayland vo.
Now it works on both vos (opengl and shm) as it should.
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r-- | video/out/wayland_common.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index ae2b480b4a..a5b73c1c6f 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -942,12 +942,16 @@ static void vo_wayland_border (struct vo *vo) static void vo_wayland_fullscreen (struct vo *vo) { struct vo_wayland_state *wl = vo->wayland; - if (!wl->display.shell || !!vo->opts->fullscreen == wl->window.is_fullscreen) + if (!wl->display.shell) return; struct wl_output *fs_output = wl->display.fs_output; if (vo->opts->fullscreen) { + if (!!vo->opts->fullscreen == wl->window.is_fullscreen) + vo_wayland_ontop(vo); // workaround for weston bug + // switch back to toplevel first before going fullscreen again + MP_DBG(wl, "going fullscreen\n"); wl->window.is_fullscreen = true; wl->window.p_width = wl->window.width; @@ -1167,9 +1171,6 @@ bool vo_wayland_config (struct vo *vo, uint32_t d_width, wl->window.p_height = d_height; wl->window.aspect = wl->window.width / (float) MPMAX(wl->window.height, 1); - vo_wayland_ontop(vo); // workaround for the weston fullscreen bug - // I can't set fullscreen twice so I need to change back and forth to get - // the right configure event from weston. vo_wayland_fullscreen(vo); return true; |