MetaWaylandPointerConstraint: Use own 'appears-focused' signal handler

Instead of having MetaWindowWayland having hooks into pointer
constraints subsystem, have the pointer constraints subsystem listen
for the signal itself and enable/disable itself.

https://bugzilla.gnome.org/show_bug.cgi?id=762661
This commit is contained in:
Jonas Ådahl
2016-02-24 19:55:58 +08:00
parent 20908b9c2c
commit 6396974eae
3 changed files with 61 additions and 14 deletions

View File

@@ -403,11 +403,6 @@ appears_focused_changed (GObject *object,
gpointer user_data)
{
MetaWindow *window = META_WINDOW (object);
MetaWaylandCompositor *wayland_compositor;
wayland_compositor = meta_wayland_compositor_get_default ();
meta_wayland_pointer_constraint_maybe_remove_for_seat (wayland_compositor->seat,
window);
/* When we're unmanaging, we remove focus from the window,
* causing this to fire. Don't do anything in that case. */
@@ -415,8 +410,6 @@ appears_focused_changed (GObject *object,
return;
surface_state_changed (window);
meta_wayland_pointer_constraint_maybe_enable_for_window (window);
}
static void