From a697d291f98e923ef0c5d2221bf04187600d4ea8 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 28 Jul 2016 14:28:59 +0200 Subject: [PATCH] make sure desktop containments exist before script the script should just change the configuration of the desktop containments, not creating them, as they are too tied to activities --- shell/shellcorona.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp index e4fce8030..480b084c3 100644 --- a/shell/shellcorona.cpp +++ b/shell/shellcorona.cpp @@ -709,6 +709,7 @@ void ShellCorona::unload() m_panelViews.clear(); m_desktopContainments.clear(); m_waitingPanels.clear(); + m_activityContainmentPlugins.clear(); while (!containments().isEmpty()) { //deleting a containment will remove it from the list due to QObject::destroyed connect in Corona @@ -730,6 +731,12 @@ void ShellCorona::requestApplicationConfigSync() void ShellCorona::loadDefaultLayout() { + //NOTE: Is important the containments already exist for each screen + // at the moment of the script execution + for (QScreen* screen : qGuiApp->screens()) { + addOutput(screen); + } + QString script = ShellManager::s_testModeLayout; if (script.isEmpty()) {