1
0
Fork 0

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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2681>
This commit is contained in:
Robert Mader 2022-11-01 16:57:42 +01:00
parent c57a500ccb
commit 50288d1ead

View file

@ -457,7 +457,7 @@ should_constraint_be_enabled (MetaWaylandPointerConstraint *constraint)
{ {
MetaWindow *window; MetaWindow *window;
window = meta_wayland_surface_get_window (constraint->surface); window = meta_wayland_surface_get_toplevel_window (constraint->surface);
if (!window) if (!window)
{ {
/* /*