MetaWaylandPointerConstraints: Require pointer focus to enable

Require pointer focus to enable, otherwise we can't guarantee it has
entered the surface, as the focus may have been given to a subsurface,
override-redirect or other sub window covering the surface that was
requested to have o pointer constraint.

https://bugzilla.gnome.org/show_bug.cgi?id=771050
This commit is contained in:
Jonas Ådahl 2016-04-01 21:10:15 +08:00
parent e6a20a025d
commit 10c7035a71

View File

@ -436,6 +436,9 @@ meta_wayland_pointer_constraint_maybe_enable (MetaWaylandPointerConstraint *cons
if (constraint->is_enabled)
return;
if (constraint->seat->pointer->focus_surface != constraint->surface)
return;
if (!constraint->surface->window)
{
/*