mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
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
@ -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 New Issue
Block a user