From 19aa5659f6293aacb498fd3e8057289a69dd7391 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Tue, 18 Aug 2020 08:11:05 -0500 Subject: wayland: reset geometry on reconfig if fullscreen Fixes #8014. --- video/out/wayland_common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'video/out') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 94261455af..4a9771a25e 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1362,10 +1362,16 @@ int vo_wayland_reconfig(struct vo *vo) wl->reduced_width = vo->dwidth / wl->gcd; wl->reduced_height = vo->dheight / wl->gcd; - if (wl->vo_opts->fullscreen && wl->vo_opts->fsscreen_id < 0) { - xdg_toplevel_set_fullscreen(wl->xdg_toplevel, NULL); - } else if (wl->vo_opts->fullscreen && wl->vo_opts->fsscreen_id >= 0) { - xdg_toplevel_set_fullscreen(wl->xdg_toplevel, wl->current_output->output); + if (wl->vo_opts->fullscreen) { + wl->geometry.x0 = 0; + wl->geometry.y0 = 0; + wl->geometry.x1 = mp_rect_w(wl->current_output->geometry) / wl->scaling; + wl->geometry.y1 = mp_rect_h(wl->current_output->geometry) / wl->scaling; + if (wl->vo_opts->fsscreen_id < 0) { + xdg_toplevel_set_fullscreen(wl->xdg_toplevel, NULL); + } else if (wl->vo_opts->fsscreen_id >= 0) { + xdg_toplevel_set_fullscreen(wl->xdg_toplevel, wl->current_output->output); + } } if (wl->vo_opts->window_maximized) -- cgit v1.2.3