From 79e682bcd0034dd6ab20622d5b8ba287b8c61e75 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 25 Jun 2014 16:38:29 +0200 Subject: [PATCH] compositor: emit grab-op-begin/end signals on plugin grabs This makes it possible to track there grabs triggered this way, in addition to the ones handled by mutter. --- src/compositor/compositor.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index e999ca6f9..eced04706 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -385,6 +385,10 @@ meta_begin_modal_for_plugin (MetaCompositor *compositor, display->grab_have_pointer = TRUE; display->grab_have_keyboard = TRUE; + g_signal_emit_by_name (display, "grab-op-begin", + meta_plugin_get_screen (plugin), + display->grab_window, display->grab_op); + if (meta_is_wayland_compositor ()) meta_display_sync_wayland_input_focus (display); @@ -401,6 +405,10 @@ meta_end_modal_for_plugin (MetaCompositor *compositor, g_return_if_fail (is_modal (display)); + g_signal_emit_by_name (display, "grab-op-end", + meta_plugin_get_screen (plugin), + display->grab_window, display->grab_op); + display->grab_op = META_GRAB_OP_NONE; display->grab_window = NULL; display->grab_have_pointer = FALSE;