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.
Unified · Split
| @@ -1011,6 +1011,9 @@ static void surface_handle_preferred_buffer_scale(void *data, · 1010 unmodified lines | |||
| 1011 | // Update scaling now. | 1011 | // Update scaling now. |
| 1012 | if (single_output_spanned(wl)) | 1012 | if (single_output_spanned(wl)) |
| 1013 | update_output_scaling(wl); | 1013 | update_output_scaling(wl); |
| 1014 | |||
| 1015 | if (!wl->current_output) | ||
| 1016 | wl->scaling = wl->pending_scaling; | ||
| 1014 | } | 1017 | } |
| 1015 | 1018 | ||
| 1016 | static void surface_handle_preferred_buffer_transform(void *data, | 1019 | static void surface_handle_preferred_buffer_transform(void *data, |
| @@ -1236,6 +1239,9 @@ static void preferred_scale(void *data, · 219 unmodified lines | |||
| 1236 | // Update scaling now. | 1239 | // Update scaling now. |
| 1237 | if (single_output_spanned(wl)) | 1240 | if (single_output_spanned(wl)) |
| 1238 | update_output_scaling(wl); | 1241 | update_output_scaling(wl); |
| 1242 | |||
| 1243 | if (!wl->current_output) | ||
| 1244 | wl->scaling = wl->pending_scaling; | ||
| 1239 | } | 1245 | } |
| 1240 | 1246 | ||
| 1241 | static const struct wp_fractional_scale_v1_listener fractional_scale_listener = { | 1247 | static const struct wp_fractional_scale_v1_listener fractional_scale_listener = { |