wayland: always resize when scale changes on surface enter

a02901cae7 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.
This commit is contained in:
Dudemanguy 2022-01-27 18:34:17 -06:00
parent 9098ae5a16
commit 19dd61fa19
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}