Commit 267b6a8d authored by Martin Flöser's avatar Martin Flöser
Browse files

[shell] Add a dbus call to activate the "main" application launcher

ShellCorona provides a new DBus method "activateLauncherMenu". If that
is invoked it will look through all panels for an applet which has
X-Plasma-Provides with org.kde.plasma.launchermenu. If that also has
a global shortuct it gets activated and no further applet is searched.

The idea behind this DBus call is to provide a way to KWin to activate
the main appliction launcher when the Meta key is pressed.

Reviewers: #plasma, hein, mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 12db3438
......@@ -21,5 +21,7 @@
<method name="evaluateScript">
<arg name="script" type="s" direction="in"/>
<method name="activateLauncherMenu">
......@@ -1635,6 +1635,22 @@ void ShellCorona::updateStruts()
void ShellCorona::activateLauncherMenu()
for (auto it = m_panelViews.constBegin(), end = m_panelViews.constEnd(); it != end; ++it) {
const auto applets = it.key()->applets();
for (auto applet : applets) {
if (applet->pluginInfo().property("X-Plasma-Provides").toStringList().contains(QStringLiteral("org.kde.plasma.launchermenu"))) {
if (!applet->globalShortcut().isEmpty()) {
emit applet->activated();
// Desktop corona handler
......@@ -143,6 +143,7 @@ public Q_SLOTS:
void loadKWinScriptInInteractiveConsole(const QString &script);
void toggleActivityManager();
void evaluateScript(const QString &string);
void activateLauncherMenu();
Plasma::Containment *addPanel(const QString &plugin);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment