From 82e0e859ee51cd37a092122524f4a89d3708162f Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 8 Nov 2024 09:14:29 +0100 Subject: Fix X11: test/checkers drawing artifacts when window is scaled (#1109) --- src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/drivers/Wayland') diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx index 290cb0873..912f9675c 100644 --- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx @@ -149,8 +149,8 @@ static void copy_region(struct wld_window *window, cairo_region_t *r) { cairo_region_get_rectangle(r, i, &rect); int left = rect.x * f; int top = rect.y * f; - int width = rect.width * f; - int height = rect.height * f; + int width = ceil((rect.x + rect.width)*f) - left; + int height = ceil((rect.y + rect.height)*f) - top; int offset = top * buffer->draw_buffer.stride + 4 * left; int W4 = 4 * width; for (int l = 0; l < height; l++) { -- cgit v1.2.3