Commit 79e682bc authored by Carlos Garnacho's avatar Carlos Garnacho Committed by Jasper St. Pierre
Browse files

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.
parent a05ae865
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment