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:
parent
c57a500ccb
commit
50288d1ead
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue