summaryrefslogtreecommitdiff
path: root/src/compositor/meta-plugin-manager.c
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2017-06-14 11:20:54 +0200
committerOlivier Fourdan <ofourdan@redhat.com>2017-08-02 11:58:55 +0200
commitce20c964a63afbb1af8ab70a3b63ccc2a01f46ff (patch)
tree110ba35f6689e02f69e8d5d97496071e9cc5125a /src/compositor/meta-plugin-manager.c
parente3f76e94824159ec874b500fc5b665731a42e0ad (diff)
downloadmutter-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.c14
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);
+}