aboutsummaryrefslogtreecommitdiff
path: root/wayland.c
diff options
context:
space:
mode:
authorRonan Pigott <ronan@rjp.ie>2023-07-14 23:53:50 +0000
committerRonan Pigott <ronan@rjp.ie>2023-07-16 03:03:16 +0000
commitb7100d57160d2ae7a38d5517f1c2cd7155737d88 (patch)
tree94562102e5982602d8dcdd02b777134ee5a1db71 /wayland.c
parentchangelog: add new ‘unreleased’ section (diff)
render: use rounding for fractional scale
If we truncate the buffer dimensions we may accidentally submit a buffer with inappropriate size.
Diffstat (limited to 'wayland.c')
-rw-r--r--wayland.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wayland.c b/wayland.c
index a25ec0f6..9195797e 100644
--- a/wayland.c
+++ b/wayland.c
@@ -401,7 +401,9 @@ update_term_for_output_change(struct terminal *term)
float old_scale = term->scale;
- render_resize(term, term->width / term->scale, term->height / term->scale);
+ render_resize(term,
+ round(term->width / term->scale),
+ round(term->height / term->scale));
term_font_dpi_changed(term, old_scale);
term_font_subpixel_changed(term);
csd_reload_font(term->window, old_scale);