summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>2016-03-19 03:19:14 +0000
committerwm4 <wm4@nowhere>2016-03-19 14:09:13 +0100
commitf0ba2a54e6cc8411c85081c6e6c802bbdaf0e66d (patch)
treebf83a31890ded720409f76358be3585955183aef
parent5447cd033c145f4a6af4d635ac9d9b10385cdca2 (diff)
downloadmpv-f0ba2a54e6cc8411c85081c6e6c802bbdaf0e66d.tar.bz2
mpv-f0ba2a54e6cc8411c85081c6e6c802bbdaf0e66d.tar.xz
Revert "wayland: set fs mode on every configure"
Prevents an infinite loop of configure event and set_fullscreen request on Weston and other compositors respecting the protocol. Fixes #2817 This reverts commit eb6b2b6e50e6e3d3db41190ad818d8b966750734.
-rw-r--r--video/out/wayland_common.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 73ef5ed570..b9dac9049c 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -141,11 +141,6 @@ static void ssurface_handle_configure(void *data,
{
struct vo_wayland_state *wl = data;
schedule_resize(wl, edges, width, height);
-
- // check for every resize if the window is in fullscreen mode and reset the
- // mode accordingly, this prevents gnome from resizing mpvs fullscreen
- // window to a smaller size
- vo_wayland_fullscreen(wl->vo);
}
static void ssurface_handle_popup_done(void *data,
@@ -1056,6 +1051,7 @@ static void vo_wayland_ontop (struct vo *vo)
MP_DBG(wl, "going ontop\n");
vo->opts->ontop = 1;
window_set_toplevel(wl);
+ schedule_resize(wl, 0, wl->window.width, wl->window.height);
}
static void vo_wayland_fullscreen (struct vo *vo)
@@ -1080,6 +1076,7 @@ static void vo_wayland_fullscreen (struct vo *vo)
MP_DBG(wl, "leaving fullscreen\n");
wl->window.is_fullscreen = false;
window_set_toplevel(wl);
+ schedule_resize(wl, 0, wl->window.p_width, wl->window.p_height);
}
}
@@ -1227,6 +1224,9 @@ static void vo_wayland_update_screeninfo(struct vo *vo, struct mp_rect *screenrc
screenrc->y1 = wl->display.current_output->height;
}
}
+
+ wl->window.fs_width = screenrc->x1;
+ wl->window.fs_height = screenrc->y1;
}
int vo_wayland_control (struct vo *vo, int *events, int request, void *arg)
@@ -1301,7 +1301,6 @@ bool vo_wayland_config (struct vo *vo)
wl->window.width = vo->dwidth;
wl->window.height = vo->dheight;
-
vo_wayland_fullscreen(vo);
return true;