Commit 7e2c1e68 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Toggle display method for KRunner

CCBUG: 353026

This introduces a method to toggle the display of KRunner.
With the exception that if KRunner is visible, but not focused it will
get focused again. This is required for the pin feature.

This method is then used for the default invocation using the shortcut.
parent 1840bdbc
......@@ -3,6 +3,8 @@
<interface name="org.kde.krunner.App">
<method name="display">
<method name="toggleDisplay">
<method name="displaySingleRunner">
<arg name="runnerName" type="s" direction="in"/>
[Desktop Entry]
Exec=dbus-send --type=method_call --dest=org.kde.krunner /App org.kde.krunner.App.display
Exec=dbus-send --type=method_call --dest=org.kde.krunner /App org.kde.krunner.App.toggleDisplay
......@@ -300,7 +300,7 @@ void View::positionOnScreen()
void View::displayOrHide()
void View::toggleDisplay()
if (isVisible() && !QGuiApplication::focusWindow()) {
......@@ -80,6 +80,7 @@ protected:
public Q_SLOTS:
void setVisible(bool visible);
void display();
void toggleDisplay();
void displaySingleRunner(const QString &runnerName);
void displayWithClipboardContents();
void query(const QString &term);
......@@ -90,7 +91,6 @@ public Q_SLOTS:
protected Q_SLOTS:
void screenGeometryChanged();
void resetScreenPos();
void displayOrHide();
void loadConfig();
void objectIncubated();
void slotFocusWindowChanged();
Supports Markdown
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