Bug 493569

Summary: loss of icon position on the desktop
Product: [Plasma] plasmashell Reporter: painless roaster <painless.roaster>
Component: FolderAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: akselmo, hein, nate, notmart
Priority: NOR Keywords: multiscreen, regression
Version: 6.1.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=468546
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:

Description painless roaster 2024-09-24 08:32:27 UTC
loss of icon position on the desktop after these actions:
 1) turning the monitor off and on
 2) suspend & resume if an external monitor is connected
Comment 1 Akseli Lahtinen 2024-09-24 08:41:14 UTC
Can reproduce 1, cant test 2 

The icons seem to only lose their position if desktop is not selected:

1. Add icons to desktop
2. Click on desktop or select any of the files so that theyre hilighted
3. Turn monitor on and off
4. This time icons should stay in position

Now do same steps, but in step 2: Click on any window so that desktop is not active.

Now icons lose position.

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Kernel Version: 6.10.10-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15,5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600
Comment 2 Bug Janitor Service 2024-10-01 13:15:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2562
Comment 3 Akseli Lahtinen 2024-10-01 14:31:14 UTC
Git commit ad1162258ddb1d30e07f9e4d909afec5cf88aa36 by Akseli Lahtinen.
Committed on 01/10/2024 at 13:14.
Pushed by akselmo into branch 'master'.

FolderViewLayer.qml: Load the icon positions when geometry changes

We need to load the icon positions when screen geometry changes,
otherwise we risk using wrong geometry when screen is turned off or
otherwise changed, then saving the icon positions of that geometry.

For example, when turning off screen in single-monitor setup,
the resolution will change to 0x0. This then moves the icons around.
Then opening the screen doesn't move the icons, so the icons stay in the
0x0 positions, and save them to the "normal" resolution.

This fixes it by loading the positions whenever the geometries change

M  +9    -0    containments/desktop/package/contents/ui/FolderViewLayer.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/ad1162258ddb1d30e07f9e4d909afec5cf88aa36
Comment 4 Akseli Lahtinen 2024-10-01 14:48:00 UTC
Git commit 96b04ec7deaf1a03786cf0c74976a7ed35cd1ade by Akseli Lahtinen.
Committed on 01/10/2024 at 14:33.
Pushed by akselmo into branch 'Plasma/6.2'.

FolderViewLayer.qml: Load the icon positions when geometry changes

We need to load the icon positions when screen geometry changes,
otherwise we risk using wrong geometry when screen is turned off or
otherwise changed, then saving the icon positions of that geometry.

For example, when turning off screen in single-monitor setup,
the resolution will change to 0x0. This then moves the icons around.
Then opening the screen doesn't move the icons, so the icons stay in the
0x0 positions, and save them to the "normal" resolution.

This fixes it by loading the positions whenever the geometries change


(cherry picked from commit ad1162258ddb1d30e07f9e4d909afec5cf88aa36)

ad116225 FolderViewLayer.qml: Load the icon positions when geometry changes

Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>

M  +9    -0    containments/desktop/package/contents/ui/FolderViewLayer.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/96b04ec7deaf1a03786cf0c74976a7ed35cd1ade