Verified Commit 52bb4063 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii Committed by Fushan Wen
Browse files

Revert "Make "Minimize all windows" action work on Wayland"

This reverts commit 2bb287b6
parent a7326bd6
Pipeline #218812 passed with stage
in 2 minutes and 54 seconds
......@@ -8,10 +8,6 @@
#include <KWindowSystem>
#include <QDBusConnection>
#include <QDBusConnectionInterface>
#include <QDBusMessage>
ShowDesktop::ShowDesktop(QObject *parent)
: QObject(parent)
{
......@@ -45,18 +41,9 @@ void ShowDesktop::setShowingDesktop(bool showingDesktop)
void ShowDesktop::minimizeAll()
{
QDBusConnection sessionBus = QDBusConnection::sessionBus();
if (sessionBus.interface()->isServiceRegistered(QStringLiteral("org.kde.KWin.Script.MinimizeAll1"))) {
sessionBus.asyncCall(QDBusMessage::createMethodCall(QStringLiteral("org.kde.KWin.Script.MinimizeAll1"),
QStringLiteral("/org/kde/KWin/Script/MinimizeAll1"),
QStringLiteral("org.kde.KWin.Script.MinimizeAll1"),
QStringLiteral("toggle")));
} else {
// KWin is not running or the minimize all script is disabled, fallback to minimizing each window.
const auto &windows = KWindowSystem::windows();
for (WId wid : windows) {
KWindowSystem::minimizeWindow(wid);
}
const auto &windows = KWindowSystem::windows();
for (WId wid : windows) {
KWindowSystem::minimizeWindow(wid);
}
}
......
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