Skip to content
Commit 39dd7bc3 authored by Marco Martin's avatar Marco Martin
Browse files

fix problems in plasmoid layout restore

The layout manager has a functionality that when the layout is resized,
it tries to move all plasmoids to keep roughtly the same proportional
distance they had before the resize happened, to make screen resolution
change the least "suprising" possible.

We actually need this in only one case:
The screen resoltion changed and there is not a saved plasmoid layout
for this resolution.

What was actually happening was that this heuristic was executed *only*
when the layout was resized due to panels being added/resized (and not
when it should have been).
When a panel gets added/resized we want the plasmoids layoput to change
*as little as possible* again, to not make surprises.
As a side effect , it casued a pretty serious bug:
plasmoids near to the vertical center of the screen migrated upwards of
few pixels at every plasma restart, because ever time it starts without
a panel which appears only later, causing that heuristic to execute and
break havoc.
Now the heuristic is executed only when the screen resolution changes,
which will cause a "config key change" event.
Execute this also when the containment migrates to a new screen, and as
soon this heuristic got executed, save the layout on the new key.

BUG:442919
BUG:437538
BUG:431432
BUG:453141
parent 08786905
Pipeline #315436 passed with stage
in 26 minutes and 44 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment