From 50288d1eadba3bc51144463753a54797bf86cb2c Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Tue, 1 Nov 2022 16:57:42 +0100 Subject: [PATCH] wayland/pointer-constraints: Fix window check on subsurfaces `get_window()` is not implemented by the subsurface role, returning `NULL`, breaking constrains for subsurfaces. While the `get_window()` behaviour could change in the future, for now use `get_toplevel_window()` which does what we need here while avoiding possible regressions. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2223 Part-of: --- src/wayland/meta-wayland-pointer-constraints.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-pointer-constraints.c b/src/wayland/meta-wayland-pointer-constraints.c index 965b95dda..305684708 100644 --- a/src/wayland/meta-wayland-pointer-constraints.c +++ b/src/wayland/meta-wayland-pointer-constraints.c @@ -457,7 +457,7 @@ should_constraint_be_enabled (MetaWaylandPointerConstraint *constraint) { MetaWindow *window; - window = meta_wayland_surface_get_window (constraint->surface); + window = meta_wayland_surface_get_toplevel_window (constraint->surface); if (!window) { /*