Bug 508408 - Desktop Icon positioned somewhere else during rearranging when docked
Summary: Desktop Icon positioned somewhere else during rearranging when docked
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (other bugs)
Version First Reported In: 6.4.4
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: multiscreen
Depends on:
Blocks: 503500
  Show dependency treegraph
 
Reported: 2025-08-18 06:41 UTC by svarghkde
Modified: 2025-11-07 23:14 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.0
Sentry Crash Report:


Attachments
bug (1.91 MB, video/webm)
2025-08-18 06:41 UTC, svarghkde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description svarghkde 2025-08-18 06:41:35 UTC
Created attachment 184199 [details]
bug

SUMMARY
I want to position my desktop icons. This works when not docked on  Laptop display only.
When it is docked, icons cannot be placed there where I wish.
When trying to move icons back then it is always positioned somewhere else 


STEPS TO REPRODUCE
See recording

OBSERVED RESULT


EXPECTED RESULT
Should work like in Windows when (hotplugging) docked or not docked

SOFTWARE/OS VERSIONS
Docked to 2 x 4K 43" at 100% scale over WD22TB4

Operating System: KDE neon User Edition
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.15.2-061502-generic (64-bit)
Graphics Platform: Wayland
Processors: 20 × 12th Gen Intel® Core™ i7-1280P
Memory: 32 GiB of RAM (31,0 GiB usable)
Graphics Processor: Intel® Iris® Xe Graphics
Manufacturer: LENOVO
Product Name: 21E8CTO1WW
System Version: ThinkPad X1 Nano Gen 2

ADDITIONAL INFORMATION
Comment 1 TraceyC 2025-08-20 19:03:36 UTC
Thanks for the bug report, and the screen recording. I see what you're talking about. 
I'm not able to reproduce this on git-master. I'd like to ask a few questions to narrow down what's happening.

Which screen are the icons are, when they won't stay where you drop them?

Also, can you please run the following command, and paste the output in a reply to this report?

kscreen-doctor -o

Thanks!
Comment 2 svarghkde 2025-08-20 21:34:37 UTC
# Which screen are the icons are, when they won't stay where you drop them?
On primary screen, on the other screen icon placement seem to work.
Laptop display disabled, lid down.

# Docked - problem with icons:
kscreen-doctor -o
Output: 1 eDP-1 fc85cd04-8d87-4a8a-a8fc-2a0f88abeead
        disabled
        connected
        priority 0
        Panel
        replication source:0
        Modes:  1:2160x1350@60*!  2:2160x1350@30  3:1600x1200@60  4:1280x1024@60  5:1024x768@60  6:1920x1200@60  7:1280x800@60  8:1920x1080@60  9:1600x900@60  10:1368x768@60  11:1280x720@60 
        Geometry: 7680,810 2160x1350
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 9% and dimming to 100%
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: always
Output: 2 DP-5 3da81c08-95ae-41f6-a3df-fe98e2c08f65
        enabled
        connected
        priority 1
        DisplayPort
        replication source:0
        Modes:  12:3840x2160@60!  13:3840x2160@60*  14:3840x2160@30  15:2560x1440@60  16:2048x1280@60  17:2048x1152@60  18:1920x1200@60  19:2048x1080@24  20:1920x1080@60  21:1920x1080@60  22:1920x1080@60  23:1920x1080@50  24:1920x1080@24  25:1920x1080@24  26:1600x1200@60  27:1680x1050@60  28:1280x1024@75  29:1280x1024@60  30:1280x800@60  31:1152x864@75  32:1280x720@60  33:1280x720@60  34:1280x720@50  35:1024x768@75  36:1024x768@60  37:800x600@75  38:800x600@60  39:720x576@50  40:720x576@50  41:720x480@60  42:720x480@60  43:720x480@60  44:720x480@60  45:640x480@75  46:640x480@60  47:640x480@60  48:640x480@60  49:720x400@70 
        Geometry: 3840,0 3840x2160
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: unsupported
        DDC/CI: allowed
        Color resolution: automatic (8), range: [6; 12] bits per color
        Allow EDR: unsupported
Output: 3 DP-6 c8b9b468-0e00-4376-bc89-5d62a265ff64
        enabled
        connected
        priority 2
        DisplayPort
        replication source:0
        Modes:  50:3840x2160@60!  51:3840x2160@60*  52:3840x2160@30  53:2560x1440@60  54:2048x1280@60  55:2048x1152@60  56:1920x1200@60  57:2048x1080@24  58:1920x1080@60  59:1920x1080@60  60:1920x1080@60  61:1920x1080@50  62:1920x1080@24  63:1920x1080@24  64:1600x1200@60  65:1680x1050@60  66:1280x1024@75  67:1280x1024@60  68:1280x800@60  69:1152x864@75  70:1280x720@60  71:1280x720@60  72:1280x720@50  73:1024x768@75  74:1024x768@60  75:800x600@75  76:800x600@60  77:720x576@50  78:720x576@50  79:720x480@60  80:720x480@60  81:720x480@60  82:720x480@60  83:640x480@75  84:640x480@60  85:640x480@60  86:640x480@60  87:720x400@70 
        Geometry: 0,0 3840x2160
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: unsupported
        DDC/CI: allowed
        Color resolution: automatic (8), range: [6; 12] bits per color
        Allow EDR: unsupported


#  Undocked no problems:
kscreen-doctor -o
Output: 1 eDP-1 fc85cd04-8d87-4a8a-a8fc-2a0f88abeead
        enabled
        connected
        priority 1
        Panel
        replication source:0
        Modes:  1:2160x1350@60*!  2:2160x1350@30  3:1600x1200@60  4:1280x1024@60  5:1024x768@60  6:1920x1200@60  7:1280x800@60  8:1920x1080@60  9:1600x900@60  10:1368x768@60  11:1280x720@60 
        Geometry: 0,0 2160x1350
        Scale: 1
        Rotation: 1
        Overscan: 0
        Vrr: incapable
        RgbRange: Automatic
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 9% and dimming to 100%
        Color resolution: automatic (10), range: [6; 12] bits per color
        Allow EDR: always
Comment 3 TraceyC 2025-08-21 16:14:43 UTC
Thanks for the additional information, that's helpful. I'll let those with more knowledge about this take a deeper look.
Comment 4 svarghkde 2025-11-04 18:59:59 UTC
Cannot reproduce since 6.5  after few docking/undocking cycles.
Comment 5 TraceyC 2025-11-04 19:46:15 UTC
(In reply to svarghkde from comment #4)
> Cannot reproduce since 6.5  after few docking/undocking cycles.

That's good news. I'll set this report to NEEDSINFO. If the problem happens again, please set this back to REPORTED.
If it doesn't happen again, you can just let this auto-close in 30 days.
Comment 6 Akseli Lahtinen 2025-11-06 10:05:15 UTC
Git commit 17cbe05c2d488ff4b8f1d759eed1037f4b97fcd9 by Akseli Lahtinen, on behalf of Błażej Szczygieł.
Committed on 06/11/2025 at 08:17.
Pushed by akselmo into branch 'master'.

Folder: Fix icon positioning on screen/available geometry changes

- revert "FolderView: Update perStripe on relativeScreenRect changes":
"availableRelativeScreenRectChanged" signal is emitted too early, we're
updating "perStripe" with old GridView geometry. It causes often wrong
icon positioning on panel resize and monitor disconnection (including PC
suspend/resume). GridView automatically updates "perStripe" when it
changes its geometry, so it's not needed.

- don't update "perStripe" when moving item - it breaks property binding

- remove on Positioner completed - we'll handle it in C++ code from
other property bindings.

- fix icon positioning - geometry changes are handled automatically by
GridView reisze event. It calls "setPerStripe()" automatically by QML
property binding. Let's handle everything in "setPerStripe()" method:
update resolution and update "m_perStripe" only there, otherwise we'll
be out of sync.

- preserve existing icon positions on resolution change. Do it only if
we have a non-existent resolution - divide by previous "perStripe" value
calculating grid positions.

- restore positions from last used resolution - restore positions from
last used resolution if we start plasmashell with non-existent
resolution. It preserves icon positions when we start with e.g.
a different monitor.
Related: bug 500868

M  +0    -20   containments/desktop/package/contents/ui/FolderView.qml
M  +9    -8    containments/desktop/plugins/folder/autotests/positionertest.cpp
M  +1    -1    containments/desktop/plugins/folder/autotests/positionertest.h
M  +12   -2    containments/desktop/plugins/folder/foldermodel.cpp
M  +7    -2    containments/desktop/plugins/folder/foldermodel.h
M  +62   -55   containments/desktop/plugins/folder/positioner.cpp
M  +3    -9    containments/desktop/plugins/folder/positioner.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/17cbe05c2d488ff4b8f1d759eed1037f4b97fcd9