check harder to include only desktops in desktops()

only desktops have an assigned activtyId, but some
containments are !isPanel() (like the systray)
wilder-5.14
Marco Martin 10 years ago
parent 49ea17e565
commit a2850caf4a
  1. 3
      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;
}

Loading…
Cancel
Save