diff options
author | Dudemanguy <random342@airmail.cc> | 2024-05-01 14:43:09 -0500 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-05-03 16:18:35 +0200 |
commit | cb613ba9169ed1576ad85fef46c7a28ae249872b (patch) | |
tree | 3f28fc577b438e117fda865848a2cbadcfc0cc30 /video | |
parent | dec73f503f948d61e30f868eea4348e26a3ea804 (diff) | |
download | mpv-cb613ba9169ed1576ad85fef46c7a28ae249872b.tar.bz2 mpv-cb613ba9169ed1576ad85fef46c7a28ae249872b.tar.xz |
wayland: set wl->scaling if there is no wl->current_output yet
If we get either preferred_scale or preferred_buffer_scale this early
during initialization the wl->scaling value should be immediately
updated instead of being deferred until later for correct geometry.
Fixes #14019.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/wayland_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 21eca3c5fc..9feb96e259 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1011,6 +1011,9 @@ static void surface_handle_preferred_buffer_scale(void *data, // Update scaling now. if (single_output_spanned(wl)) update_output_scaling(wl); + + if (!wl->current_output) + wl->scaling = wl->pending_scaling; } static void surface_handle_preferred_buffer_transform(void *data, @@ -1236,6 +1239,9 @@ static void preferred_scale(void *data, // Update scaling now. if (single_output_spanned(wl)) update_output_scaling(wl); + + if (!wl->current_output) + wl->scaling = wl->pending_scaling; } static const struct wp_fractional_scale_v1_listener fractional_scale_listener = { |