mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
wayland: Look up pointer logical focus when enabling constraints
Pointer constraints obey to logical pointer focus changes, and looking
up the current surface in order to maybe enable them is getting ahead
of itself, since the pointer focus might differ from the current surface
due to other factors (e.g. grabs).
Change the code checking whether constraints should be enabled to again
check the pointer logical focus, this will be influenced by the
MetaWaylandEventInterface mechanism, and correctly reflect the logical
state accounting for those factors.
Fixes: 125ba92169
("wayland: Port pointer constraints to using MetaWaylandEventInterface")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3303
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3618>
This commit is contained in:
parent
1d5676bc9a
commit
4fa2706b9b
@ -482,7 +482,8 @@ should_constraint_be_enabled (MetaWaylandPointerConstraint *constraint)
|
||||
if (window->unmanaging)
|
||||
return FALSE;
|
||||
|
||||
if (constraint->seat->pointer->current != constraint->surface)
|
||||
if (constraint->surface !=
|
||||
meta_wayland_pointer_get_focus_surface (constraint->seat->pointer))
|
||||
return FALSE;
|
||||
|
||||
if (meta_wayland_surface_is_xwayland (constraint->surface))
|
||||
|
Loading…
Reference in New Issue
Block a user