summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2020-08-18 08:11:05 -0500
committerDudemanguy <random342@airmail.cc>2020-08-18 08:11:05 -0500
commit19aa5659f6293aacb498fd3e8057289a69dd7391 (patch)
tree779e6c5279eef74bb6f05d906480b5a14b457fe0 /video/out/wayland_common.c
parent0216f8c787cb8a2526e0fe8207d7d12c5aeff327 (diff)
downloadmpv-19aa5659f6293aacb498fd3e8057289a69dd7391.tar.bz2
mpv-19aa5659f6293aacb498fd3e8057289a69dd7391.tar.xz
wayland: reset geometry on reconfig if fullscreen
Fixes #8014.
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r--video/out/wayland_common.c14
1 files changed, 10 insertions, 4 deletions
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)