diff --git a/src/compositor/compositor-private.h b/src/compositor/compositor-private.h index 1112da8cf..ba58bf175 100644 --- a/src/compositor/compositor-private.h +++ b/src/compositor/compositor-private.h @@ -65,4 +65,7 @@ void meta_compositor_flash_window (MetaCompositor *compositor, MetaCloseDialog * meta_compositor_create_close_dialog (MetaCompositor *compositor, MetaWindow *window); +MetaInhibitShortcutsDialog * meta_compositor_create_inhibit_shortcuts_dialog (MetaCompositor *compositor, + MetaWindow *window); + #endif /* META_COMPOSITOR_PRIVATE_H */ diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index a4fd235c4..17e8a55dd 100644 --- a/src/compositor/compositor.c +++ b/src/compositor/compositor.c @@ -1422,3 +1422,11 @@ meta_compositor_create_close_dialog (MetaCompositor *compositor, return meta_plugin_manager_create_close_dialog (compositor->plugin_mgr, window); } + +MetaInhibitShortcutsDialog * +meta_compositor_create_inhibit_shortcuts_dialog (MetaCompositor *compositor, + MetaWindow *window) +{ + return meta_plugin_manager_create_inhibit_shortcuts_dialog (compositor->plugin_mgr, + window); +} diff --git a/src/compositor/meta-plugin-manager.c b/src/compositor/meta-plugin-manager.c index bcbf6827a..834f678dd 100644 --- a/src/compositor/meta-plugin-manager.c +++ b/src/compositor/meta-plugin-manager.c @@ -28,6 +28,7 @@ #include "meta-module.h" #include "window-private.h" #include "meta-close-dialog-default-private.h" +#include "meta-inhibit-shortcuts-dialog-default-private.h" #include #include @@ -390,3 +391,16 @@ meta_plugin_manager_create_close_dialog (MetaPluginManager *plugin_mgr, return meta_close_dialog_default_new (window); } + +MetaInhibitShortcutsDialog * +meta_plugin_manager_create_inhibit_shortcuts_dialog (MetaPluginManager *plugin_mgr, + MetaWindow *window) +{ + MetaPlugin *plugin = plugin_mgr->plugin; + MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin); + + if (klass->create_inhibit_shortcuts_dialog) + return klass->create_inhibit_shortcuts_dialog (plugin, window); + + return meta_inhibit_shortcuts_dialog_default_new (window); +} diff --git a/src/compositor/meta-plugin-manager.h b/src/compositor/meta-plugin-manager.h index f202945a0..19159032c 100644 --- a/src/compositor/meta-plugin-manager.h +++ b/src/compositor/meta-plugin-manager.h @@ -94,4 +94,8 @@ void meta_plugin_manager_show_window_menu_for_rect (MetaPluginManager *mgr, MetaCloseDialog * meta_plugin_manager_create_close_dialog (MetaPluginManager *plugin_mgr, MetaWindow *window); +MetaInhibitShortcutsDialog * + meta_plugin_manager_create_inhibit_shortcuts_dialog (MetaPluginManager *plugin_mgr, + MetaWindow *window); + #endif diff --git a/src/meta/meta-plugin.h b/src/meta/meta-plugin.h index 85a738f09..73d94e5f0 100644 --- a/src/meta/meta-plugin.h +++ b/src/meta/meta-plugin.h @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -239,6 +240,17 @@ struct _MetaPluginClass */ MetaCloseDialog * (* create_close_dialog) (MetaPlugin *plugin, MetaWindow *window); + + /** + * MetaPluginClass::create_inhibit_shortcuts_dialog: + * @plugin: a #MetaPlugin + * @window: a #MetaWindow + * + * Virtual function called to create a "inhibit shortcuts" dialog + * when a client requests compositor shortcuts to be inhibited. + */ + MetaInhibitShortcutsDialog * (* create_inhibit_shortcuts_dialog) (MetaPlugin *plugin, + MetaWindow *window); }; /**