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.
This commit is contained in:
Alexander Preisinger authored and wm4 committed 2014-01-06 20:21:55 +01:00
1 parent 9755850b3d
commit 4326fdfe2a
1 file changed
+5 -4
+5 -4
View File
@@ -808,12 +808,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;
@@ -984,9 +988,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;