From 8c2b9f4e71195e6ac2431671dab26d03e31d70ac Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 3 May 2024 11:48:59 +0300 Subject: [PATCH] xwayland: Use correct xwl_window lookup function in xwl_set_shape MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In xwl_set_shape(), xwl_window_set_input_region() should be called only when the input shape of the toplevel window changes. However, given that xwl_window_from_window() is going to walk the ancestor tree until it finds an xwl_window, that lookup function cannot be used. Instead, xwl_window_get() should be used. It's going to return a valid xwl_window object iff the specified window has one associated with it. Fixes: a4ed100c0 - xwayland: Set wl_surface input region Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1672 Reviewed-by: Michel Dänzer Signed-off-by: Vlad Zahorodnii Part-of: --- hw/xwayland/xwayland-screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index 9f9cd6bc0..e1c64b9aa 100644 --- a/hw/xwayland/xwayland-screen.c +++ b/hw/xwayland/xwayland-screen.c @@ -341,7 +341,7 @@ xwl_set_shape(WindowPtr window, struct xwl_window *xwl_window; xwl_screen = xwl_screen_get(screen); - xwl_window = xwl_window_from_window(window); + xwl_window = xwl_window_get(window); screen->SetShape = xwl_screen->SetShape; (*screen->SetShape) (window, kind);