Bug 346815

Summary: Layout Manager sometimes creates lets applets to overlap
Product: [Plasma] plasmashell Reporter: Kai Uwe Broulik <kde>
Component: Desktop ContainmentAssignee: Sebastian Kügler <sebas>
Status: RESOLVED FIXED    
Severity: normal CC: bhush94, notmart
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.6.0
Attachments: Two notes ontop of each other

Description Kai Uwe Broulik 2015-04-27 20:55:29 UTC
When moving a widget around the LayoutManager tries to find a geometry for your applet where it won't overlap. However, it will ignore compact applets.

Reproducible: Always

Steps to Reproduce:
1. Add a widget to your desktop and resize it so it collapses into its compact representation (tiny sticky note) or use one that is always compact (like Kickoff)
2. Add another widget and drag it around ontop of the other one
3.

Actual Results:  
The LayoutManager happily ignores the compact applet and allows you to place your applet ontop of it

Expected Results:  
The LayoutManager reserves room for that applet in the same way as it does with others

I have press-and-hold to move widgets enabled
Comment 1 Kai Uwe Broulik 2015-04-27 20:55:49 UTC
Created attachment 92294 [details]
Two notes ontop of each other
Comment 2 Marco Martin 2015-05-01 09:43:27 UTC
can't reproduce (the layoutmanager doesn't make distiction between full and compact representation)

However i remember to have seen this happen, what i think it happens is the space of one of the applet being mistakely marked as free for some reason.

in your case, I think if you move slightly both applets when they don't overlap, and after try to move one on top of the other, the layout should work correctly
Comment 3 Bhushan Shah 2015-05-24 14:27:45 UTC
I've seen this behavior too sometimes.
Comment 4 Bhushan Shah 2015-06-03 16:13:14 UTC
Seen this few days ago again..
Comment 5 Marco Martin 2015-10-28 14:34:58 UTC
i could reproduce once overlapping two expanded calendar, so it doesn't depend from expanded vs collapsed, but is very random
Comment 6 David Rosca 2016-01-13 15:13:46 UTC
Git commit 2c56715c93cb439df77f29260e3bfc9cbd76e806 by David Rosca.
Committed on 13/01/2016 at 15:00.
Pushed by drosca into branch 'master'.

Fix calculation of availableSpace for applets

Fix calculation when positions[row] is undefined. Currently it would
incorrectly return the whole requested area being available without
any further checks.

REVIEW: 126731
FIXED-IN: 5.6.0

M  +1    -7    containments/desktop/package/contents/code/LayoutManager.js
M  +2    -0    containments/desktop/package/contents/ui/main.qml

http://commits.kde.org/plasma-desktop/2c56715c93cb439df77f29260e3bfc9cbd76e806