diff --git a/src/dbusinterface.cpp b/src/dbusinterface.cpp index 2884435b6d..52b2962b1b 100644 --- a/src/dbusinterface.cpp +++ b/src/dbusinterface.cpp @@ -202,7 +202,7 @@ QVariantMap clientToVariantMap(const AbstractClient *c) {QStringLiteral("y"), c->y()}, {QStringLiteral("width"), c->width()}, {QStringLiteral("height"), c->height()}, - {QStringLiteral("x11DesktopNumber"), c->desktop()}, + {QStringLiteral("desktops"), c->desktopIds()}, {QStringLiteral("minimized"), c->isMinimized()}, {QStringLiteral("shaded"), c->isShade()}, {QStringLiteral("fullscreen"), c->isFullScreen()}, diff --git a/src/kcmkwin/kwinrules/rulesmodel.cpp b/src/kcmkwin/kwinrules/rulesmodel.cpp index b1910a20d5..8c09c86903 100644 --- a/src/kcmkwin/kwinrules/rulesmodel.cpp +++ b/src/kcmkwin/kwinrules/rulesmodel.cpp @@ -670,7 +670,8 @@ const QHash RulesModel::x11PropertyHash() { "skipPager", "skippager" }, { "skipSwitcher", "skipswitcher" }, { "type", "type" }, - { "desktopFile", "desktopfile" } + { "desktopFile", "desktopfile" }, + { "desktops", "desktops" }, }; return propertyToRule; }; @@ -699,18 +700,6 @@ void RulesModel::setSuggestedProperties(const QVariantMap &info) m_rules["wmclass"]->setSuggestedValue(wmsimpleclass); m_rules["wmclasshelper"]->setSuggestedValue(wmcompleteclass); - //TODO: Make the DBus method `queryWindowInfo` return the list of desktop IDs and use them directly - if (info.value("x11DesktopNumber").toInt() == NET::OnAllDesktops) { - m_rules["desktops"]->setSuggestedValue(QStringList()); - } else { - for (const auto vd : qAsConst(m_virtualDesktops)) { - if (info.value("x11DesktopNumber").toUInt() == vd.position + 1) { - m_rules["desktops"]->setSuggestedValue(QStringList{ vd.id }); - break; - } - } - } - #ifdef KWIN_BUILD_ACTIVITIES const QStringList activities = info.value("activities").toStringList(); m_rules["activity"]->setSuggestedValue(activities.isEmpty() ? QStringList{ Activities::nullUuid() }