mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
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.
This commit is contained in:
parent
f13c86d651
commit
3ed80495e0
@ -385,6 +385,10 @@ meta_begin_modal_for_plugin (MetaCompositor *compositor,
|
|||||||
display->grab_have_pointer = TRUE;
|
display->grab_have_pointer = TRUE;
|
||||||
display->grab_have_keyboard = 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 ())
|
if (meta_is_wayland_compositor ())
|
||||||
meta_display_sync_wayland_input_focus (display);
|
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_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_op = META_GRAB_OP_NONE;
|
||||||
display->grab_window = NULL;
|
display->grab_window = NULL;
|
||||||
display->grab_have_pointer = FALSE;
|
display->grab_have_pointer = FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user