Commit 9d148c13 authored by Ivan Čukić's avatar Ivan Čukić 👁

Merge branch 'ivan/data-engine-free-activity-switcher'

parents 886aefd6 2053b3ac
......@@ -57,9 +57,7 @@ DND.DropArea {
MouseArea {
anchors.fill: parent
onClicked: {
var service = dataSource.serviceForSource(activeSource)
var operation = service.operationDescription("toggleActivityManager")
service.startOperationCall(operation)
ActivitySwitcher.Backend.toggleActivityManager()
}
}
......
......@@ -28,6 +28,8 @@
#include <QX11Info>
#include <QTimer>
#include <QDateTime>
#include <QDBusMessage>
#include <QDBusConnection>
// Qml and QtQuick
#include <QQuickImageProvider>
......@@ -526,4 +528,15 @@ void SwitcherBackend::setDropMode(bool value)
}
}
void SwitcherBackend::toggleActivityManager()
{
auto message = QDBusMessage::createMethodCall(
QStringLiteral("org.kde.plasmashell"),
QStringLiteral("/PlasmaShell"),
QStringLiteral("org.kde.PlasmaShell"),
QStringLiteral("toggleActivityManager"));
QDBusConnection::sessionBus().call(message, QDBus::NoBlock);
}
......@@ -76,6 +76,8 @@ public Q_SLOTS:
void dropMove(QMimeData* mimeData, const QVariant &activityId);
bool dropEnabled() const;
void toggleActivityManager();
private:
template <typename Handler>
inline void registerShortcut(const QString &actionName, const QString &name,
......
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