aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-06-26 19:09:30 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-06-29 13:38:24 +0000
commitce31cc518a48d978c84448424d0d2a6bba4a5a5f (patch)
tree520900e18bca59dccd345bf0c9d4af45a67e5233
parentwayland: surface_scale(): improve debug logging (diff)
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.
-rw-r--r--wayland.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wayland.c b/wayland.c
index cff432bb..c9693200 100644
--- a/wayland.c
+++ b/wayland.c
@@ -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),