wayland: surface_scale(): reset buffer scale when using fractional scaling

Since the first frame uses legacy scaling, the surface may have a
buffer scale > 1, which isn’t allowed.
This commit is contained in:
Daniel Eklöf 2023-06-26 21:09:30 +02:00
parent c61247f317
commit ce31cc518a
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -1901,6 +1901,7 @@ wayl_surface_scale_explicit_width_height(
LOG_DBG("scaling by a factor of %.2f using fractional scaling "
"(width=%d, height=%d) ", scale, width, height);
wl_surface_set_buffer_scale(surf->surf, 1);
wp_viewport_set_destination(
surf->viewport,
round((float)width / scale),