Bug 437538 - Widgets get move on startup
Summary: Widgets get move on startup
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Containment (show other bugs)
Version: 5.21.90
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Marco Martin
URL:
Keywords:
: 464763 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-05-23 11:56 UTC by aronkvh
Modified: 2023-01-25 17:27 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
I couldn't make a screenshot so I recorded a video (2.05 MB, video/mp4)
2021-05-24 16:44 UTC, aronkvh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aronkvh 2021-05-23 11:56:34 UTC
SUMMARY


STEPS TO REPRODUCE
1.turn on a computer
2. log in
3. wait until the desktop appears, after 2s the centered clock moves to the right



EXPECTED RESULT
All widgets stay in the position I set them to

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Kde Neon 5.21
(available in About System)
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I have 2 60hz philips monitors.
1st: 1920x1080, hdmi
2.st: 1680x1050

I'm on integrated graphics but the same happened with an nvdidia gpu too, and on the stable Plasma 5.21
Comment 1 Marco Martin 2021-05-24 15:20:33 UTC
does it move by few pixels or by a whole lot?
can you post before/after screenshots?
Comment 2 aronkvh 2021-05-24 16:44:48 UTC
Created attachment 138749 [details]
I couldn't make a screenshot so I recorded a video
Comment 3 Bug Janitor Service 2023-01-25 14:27:53 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2535
Comment 4 Marco Martin 2023-01-25 16:08:58 UTC
Git commit 39dd7bc3b75df58eb2d569df4f89cbe65f1113b6 by Marco Martin.
Committed on 25/01/2023 at 16:07.
Pushed by mart into branch 'master'.

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.
Related: bug 442919, bug 431432, bug 453141

M  +7    -2    components/containmentlayoutmanager/abstractlayoutmanager.h
M  +14   -4    components/containmentlayoutmanager/appletslayout.cpp
M  +9    -2    components/containmentlayoutmanager/gridlayoutmanager.cpp
M  +1    -1    components/containmentlayoutmanager/gridlayoutmanager.h

https://invent.kde.org/plasma/plasma-workspace/commit/39dd7bc3b75df58eb2d569df4f89cbe65f1113b6
Comment 5 Marco Martin 2023-01-25 16:23:51 UTC
Git commit c7fe9fc0d271a145c9025994673599fb51872446 by Marco Martin.
Committed on 25/01/2023 at 16:23.
Pushed by mart into branch 'Plasma/5.27'.

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.
Related: bug 442919, bug 431432, bug 453141

M  +7    -2    components/containmentlayoutmanager/abstractlayoutmanager.h
M  +14   -4    components/containmentlayoutmanager/appletslayout.cpp
M  +9    -2    components/containmentlayoutmanager/gridlayoutmanager.cpp
M  +1    -1    components/containmentlayoutmanager/gridlayoutmanager.h

https://invent.kde.org/plasma/plasma-workspace/commit/c7fe9fc0d271a145c9025994673599fb51872446
Comment 6 Nate Graham 2023-01-25 17:27:53 UTC
*** Bug 464763 has been marked as a duplicate of this bug. ***