From 19dd61fa192ed6f2372efc54bfe15586a29bd09b Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Thu, 27 Jan 2022 18:34:17 -0600 Subject: 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. --- video/out/wayland_common.c | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3