From 9fef4b8091656a3995fe764fe6031ae435971fd5 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 3 Sep 2020 14:47:48 +0200 Subject: [PATCH] Fix cursor size, present scale, and present damage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Antonin Décimo: update xwayland-cursor.c after 79afbd60] Signed-off-by: Antonin Décimo --- hw/xwayland/xwayland-cursor.c | 2 ++ hw/xwayland/xwayland-present.c | 1 + hw/xwayland/xwayland-window.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c index f62839ac14..da4bcea026 100644 --- a/hw/xwayland/xwayland-cursor.c +++ b/hw/xwayland/xwayland-cursor.c @@ -171,6 +171,8 @@ xwl_cursor_attach_pixmap(struct xwl_seat *xwl_seat, } wl_surface_attach(xwl_cursor->surface, buffer, 0, 0); + wl_surface_set_buffer_scale(xwl_cursor->surface, + xwl_seat->xwl_screen->global_output_scale); xwl_surface_damage(xwl_seat->xwl_screen, xwl_cursor->surface, 0, 0, xwl_seat->x_cursor->bits->width, xwl_seat->x_cursor->bits->height); diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index 83d67517ac..f73080ac2a 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -475,6 +475,7 @@ xwl_present_flip(WindowPtr present_window, /* We can flip directly to the main surface (full screen window without clips) */ wl_surface_attach(xwl_window->surface, buffer, 0, 0); + wl_surface_set_buffer_scale(xwl_window->surface, xwl_window->xwl_screen->global_output_scale); if (!xwl_window->frame_callback) xwl_window_create_frame_callback(xwl_window); diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index 1b2487c077..ed3903853f 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -820,8 +820,8 @@ xwl_window_post_damage(struct xwl_window *xwl_window) } #endif - wl_surface_set_buffer_scale(xwl_window->surface, xwl_screen->global_output_scale); wl_surface_attach(xwl_window->surface, buffer, 0, 0); + wl_surface_set_buffer_scale(xwl_window->surface, xwl_screen->global_output_scale); /* Arbitrary limit to try to avoid flooding the Wayland * connection. If we flood it too much anyway, this could