From 10cabe0b978677cfac4bfb405295a16ee8eedb34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 17 Mar 2020 12:58:12 +0100 Subject: [PATCH] xwayland: Propagate damage x1/y1 coordinates in xwl_present_flip This couldn't have worked correctly for non-0 x1/y1. Noticed by inspection. Reviewed-by: Simon Ser (cherry picked from commits 9141196d3104ab37385c3e385deaa70c002dd184) (cherry picked fixup from commit 85a6fd11c723888ca093785a3df43066fdca9c33) --- hw/xwayland/xwayland-present.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index f003170a9..6076f6498 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -497,7 +497,9 @@ xwl_present_flip(WindowPtr present_window, /* Realign timer */ xwl_present_reset_timer(xwl_present_window); - wl_surface_damage(xwl_window->surface, 0, 0, + wl_surface_damage(xwl_window->surface, + 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);