From 85a6fd11c723888ca093785a3df43066fdca9c33 Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Wed, 8 Jul 2020 17:08:55 +0200 Subject: [PATCH] xwayland: Damage surface in surface-relative coordinates In 9141196d positional coordinates were added to the damage call of pixmap flips. The damage box coordinates are in screen space though and we need to convert them first to surface-relative ones by substracting the origin of the window. Signed-off-by: Roman Gilg --- hw/xwayland/xwayland-present.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index a5326d916..b1a050a7c 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -497,7 +497,8 @@ xwl_present_flip(WindowPtr present_window, xwl_present_reset_timer(xwl_present_window); xwl_surface_damage(xwl_window->xwl_screen, xwl_window->surface, - damage_box->x1, damage_box->y1, + damage_box->x1 - present_window->drawable.x, + damage_box->y1 - present_window->drawable.y, damage_box->x2 - damage_box->x1, damage_box->y2 - damage_box->y1);