diff options
author | Dudemanguy <random342@airmail.cc> | 2022-01-27 18:34:17 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2022-01-27 18:34:17 -0600 |
commit | 19dd61fa192ed6f2372efc54bfe15586a29bd09b (patch) | |
tree | 2db154356dd7b8ad6cd29b40fdbb3ac1e158e387 | |
parent | 9098ae5a16d558a50345ecb8f74dcf8d79dd1d77 (diff) | |
download | mpv-19dd61fa192ed6f2372efc54bfe15586a29bd09b.tar.bz2 mpv-19dd61fa192ed6f2372efc54bfe15586a29bd09b.tar.xz |
wayland: always resize when scale changes on surface enter
a02901cae77c86fb9de997a418296d1fc0e3eada changed how mpv was handling
wl_surface_set_buffer_scale. It's correct in that constantly setting the
surface scale on every resize (which mpv was previously doing) is
unneccessary and not right. However, it introduced a slight regression
if someone moved a surface to a new monitor with the same resolution but
a different scale. It did not trigger a resize and thus the video would
have incorrect dimensions. A later refactor changed how things looked
inside here, but this regression wasn't fixed. A resize should always be
triggered if the scale changes in this surface event. Fixes #9426.
-rw-r--r-- | video/out/wayland_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index c2591426b6..285cccd132 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -704,6 +704,7 @@ static void surface_handle_enter(void *data, struct wl_surface *wl_surface, if (wl->scaling != wl->current_output->scale) { set_surface_scaling(wl); spawn_cursor(wl); + force_resize = true; wl->pending_vo_events |= VO_EVENT_DPI; } |