plasma5-workspace/0001-check-harder-to-include-only-desktops-in-desktops.patch

29 lines
1.1 KiB
Diff

From a2850caf4a442c5e92d4c027b9a1c78c9dee24b5 Mon Sep 17 00:00:00 2001
From: Marco Martin <notmart@gmail.com>
Date: Fri, 29 Jul 2016 13:23:18 +0200
Subject: [PATCH 1/2] check harder to include only desktops in desktops()
only desktops have an assigned activtyId, but some
containments are !isPanel() (like the systray)
---
shell/scripting/scriptengine.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/shell/scripting/scriptengine.cpp b/shell/scripting/scriptengine.cpp
index f368e7e3b918bb09e69a3cb486680ab3d85fd15e..a17ba1a708ddc69caa483a667c7c390c52d6d84b 100644
--- a/shell/scripting/scriptengine.cpp
+++ b/shell/scripting/scriptengine.cpp
@@ -882,7 +882,8 @@ QScriptValue ScriptEngine::desktops(QScriptContext *context, QScriptEngine *engi
int count = 0;
foreach (Plasma::Containment *c, env->corona()->containments()) {
- if (!isPanel(c)) {
+ //make really sure we get actual desktops, so check for a non empty activty id
+ if (!isPanel(c) && !c->activity().isEmpty()) {
containments.setProperty(count, env->wrap(c));
++count;
}
--
2.6.6