Add a modal mode for plugins
mutter_plugin_begin_modal() and mutter_plugin_begin_modal() allow putting a plugin into a "modal" state. This means: - The plugin has the keyboard and mouse grabbed - All keyboard and mouse events go exclusively to the plugin mutter-plugin.[ch]: Add public API compositor.c compositor-private.h: Implement the API mutter-plugin-manager.c: When reloading plugins, make sure none of them are modal at that moment, and if so force-unmodal them. common.h: Add META_GRAB_OP_COMPOSITOR display: When display->grab_op is META_GRAB_OP_COMPOSITOR forward relevant events exclusively to the compositor. http://bugzilla.gnome.org/show_bug.cgi?id=590754
This commit is contained in:
@@ -255,6 +255,31 @@ void
|
||||
mutter_plugin_set_stage_input_region (MutterPlugin *plugin,
|
||||
XserverRegion region);
|
||||
|
||||
/**
|
||||
* MetaModalOptions:
|
||||
* @META_MODAL_POINTER_ALREADY_GRABBED: if set the pointer is already
|
||||
* grabbed by the plugin and should not be grabbed again.
|
||||
* @META_MODAL_KEYBOARD_ALREADY_GRABBED: if set the keyboard is already
|
||||
* grabbed by the plugin and should not be grabbed again.
|
||||
*
|
||||
* Options that can be provided when calling mutter_plugin_begin_modal().
|
||||
*/
|
||||
typedef enum {
|
||||
META_MODAL_POINTER_ALREADY_GRABBED = 1 << 0,
|
||||
META_MODAL_KEYBOARD_ALREADY_GRABBED = 1 << 1
|
||||
} MetaModalOptions;
|
||||
|
||||
gboolean
|
||||
mutter_plugin_begin_modal (MutterPlugin *plugin,
|
||||
Window grab_window,
|
||||
Cursor cursor,
|
||||
MetaModalOptions options,
|
||||
guint32 timestamp);
|
||||
|
||||
void
|
||||
mutter_plugin_end_modal (MutterPlugin *plugin,
|
||||
guint32 timestamp);
|
||||
|
||||
GList *
|
||||
mutter_plugin_get_windows (MutterPlugin *plugin);
|
||||
|
||||
|
Reference in New Issue
Block a user