https://bugs.kde.org/show_bug.cgi?id=356899

--- Comment #14 from Jonathan Marten <j...@keelhaul.me.uk> ---
There is a fix that appears to work for me, although I only have a single
monitor setup and have not been able to test it with multiple screens.

The problem happens when starting with a new configuration and then changing
the desktop containment from the default Desktop to a Folder View.  The
containment is switched correctly in
ScreenCorona::setContainmentTypeForScreen(), but the newly created containment
has its
lastScreen set to -1 (because it has not been displayed anywhere yet) and it is
saved in the config file with that setting, as seen in comment #5.  On the next
startup that containment is not found by
ScreenCorona::createContainmentForActivity(), because its screen number does
not match, and a new default containment is created.

The solution is to copy the lastScreen, along with the activityId, when the new
containment is being created in setContainmentTypeForScreen().

Patch for plasma-workspace/shell/screencorona.cpp:

diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
index 778e760..b8dbf39 100644
--- a/shell/shellcorona.cpp
+++ b/shell/shellcorona.cpp
@@ -1554,6 +1554,7 @@ Plasma::Containment
*ShellCorona::setContainmentTypeForScreen(int screen, const

     newContainment->init();
     newCg.writeEntry("activityId", oldContainment->activity());
+    newCg.writeEntry("lastScreen", oldContainment->lastScreen());
     newContainment->restore(newCg);
    
newContainment->updateConstraints(Plasma::Types::StartupCompletedConstraint);
     newContainment->save(newCg);

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to