diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2017-06-14 11:20:54 +0200 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2017-08-02 11:58:55 +0200 |
commit | ce20c964a63afbb1af8ab70a3b63ccc2a01f46ff (patch) | |
tree | 110ba35f6689e02f69e8d5d97496071e9cc5125a /src/compositor/meta-plugin-manager.c | |
parent | e3f76e94824159ec874b500fc5b665731a42e0ad (diff) | |
download | mutter-ce20c964a63afbb1af8ab70a3b63ccc2a01f46ff.tar.gz |
compositor: add vmethod to override inhibit shortcut dialog
A MetaPlugin implementation of the MetaInhibitShortcutsDialog can be
used in place of the default inhibit shortcut.
https://bugzilla.gnome.org/show_bug.cgi?id=783342
Diffstat (limited to 'src/compositor/meta-plugin-manager.c')
-rw-r--r-- | src/compositor/meta-plugin-manager.c | 14 |
1 files changed, 14 insertions, 0 deletions
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 <string.h> #include <stdlib.h> @@ -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); +} |