mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
MetaWaylandPointerConstraint: Require 'appears-focused' to enable
Instead of relying on the keyboard focus surface, use the 'appears-focused' state of the corresponding MetaWindow to determine if a constraint should enable or not. https://bugzilla.gnome.org/show_bug.cgi?id=762661
This commit is contained in:
parent
b04747b174
commit
1c94d0e598
@ -368,13 +368,18 @@ is_within_constraint_region (MetaWaylandPointerConstraint *constraint,
|
||||
static void
|
||||
meta_wayland_pointer_constraint_maybe_enable (MetaWaylandPointerConstraint *constraint)
|
||||
{
|
||||
MetaWaylandSeat *seat = constraint->seat;
|
||||
wl_fixed_t sx, sy;
|
||||
|
||||
if (constraint->is_enabled)
|
||||
return;
|
||||
|
||||
if (seat->keyboard.focus_surface != constraint->surface)
|
||||
if (!constraint->surface->window)
|
||||
{
|
||||
g_warn_if_reached ();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!meta_window_appears_focused (constraint->surface->window))
|
||||
return;
|
||||
|
||||
meta_wayland_pointer_get_relative_coordinates (&constraint->seat->pointer,
|
||||
|
Loading…
Reference in New Issue
Block a user