mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
wayland/pointer-constraints: Maybe remove when pointer focus changes
Also maybe remove a constraint when the pointer focus changes. This is needed because when Xwayland has a constraint focus may change, the constraint object will not receive a 'appears-focused' event on its window since it never changed. This happens for example when an override-redirect window (which never appears focused) holds the constraint, and alt-tab happens. In this case focus changes, but from the constraint's point of view, none of the windows it knows about changed its focus appearance. https://bugzilla.gnome.org/show_bug.cgi?id=771345
This commit is contained in:
parent
32276cf418
commit
e1516e4f31
@ -279,6 +279,15 @@ static void
|
|||||||
pointer_focus_surface_changed (MetaWaylandPointer *pointer,
|
pointer_focus_surface_changed (MetaWaylandPointer *pointer,
|
||||||
MetaWaylandPointerConstraint *constraint)
|
MetaWaylandPointerConstraint *constraint)
|
||||||
{
|
{
|
||||||
|
MetaWindow *window = constraint->surface->window;
|
||||||
|
|
||||||
|
if (window)
|
||||||
|
{
|
||||||
|
MetaWaylandSeat *seat = meta_wayland_pointer_get_seat (pointer);
|
||||||
|
|
||||||
|
meta_wayland_pointer_constraint_maybe_remove_for_seat (seat, window);
|
||||||
|
}
|
||||||
|
|
||||||
meta_wayland_pointer_constraint_maybe_enable (constraint);
|
meta_wayland_pointer_constraint_maybe_enable (constraint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user