Bug 444071 - 'Switch alternatives' forcibly moves widgets
Summary: 'Switch alternatives' forcibly moves widgets
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 5.23.0
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-20 01:45 UTC by David
Modified: 2022-02-02 19:50 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David 2021-10-20 01:45:31 UTC
SUMMARY
If I put a resource usage widget at the right side of my panel, and then right-click to switch alternatives to something else, the widget will be forcibly moved to the left side of the panel.

STEPS TO REPRODUCE
1. Put a disk usage widget or similar next to the system tray (right side of the panel).
2. Right-click the widget, select "Show Alternatives", and switch to some other alternative.

OBSERVED RESULT
The new widget is placed at the left inbetween the application launcher and the desktop pager.

EXPECTED RESULT
Should stay where I put it.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.23.0
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: 5.14.0-3-amd64 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 2700 Eight-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD VEGA10

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2021-10-20 15:03:07 UTC
Yes, I can reproduce this. It didn't used to; seems like a regression. Quite annoying.
Comment 2 Felipe Kinoshita 2021-10-21 22:09:58 UTC
FWIW this also happens to me on 5.22.5
Comment 3 Bug Janitor Service 2021-10-22 06:59:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/627
Comment 4 Nate Graham 2021-11-03 16:49:32 UTC
Git commit d0479b98b0f0c650e8b57fb5bfba30689b1d80b4 by Nate Graham, on behalf of Alexander Lohnau.
Committed on 03/11/2021 at 16:48.
Pushed by ngraham into branch 'master'.

DRAFT: Fix issues with LayoutManager.insertAtCoordinates

The spacing must be multiplied by two in order to get the correct position

M  +8    -3    containments/panel/contents/ui/LayoutManager.js

https://invent.kde.org/plasma/plasma-desktop/commit/d0479b98b0f0c650e8b57fb5bfba30689b1d80b4
Comment 5 Nate Graham 2021-11-03 16:50:20 UTC
Git commit a47ead6339eb516a2d84a102088eb380ae118c8d by Nate Graham, on behalf of Alexander Lohnau.
Committed on 03/11/2021 at 16:50.
Pushed by ngraham into branch 'Plasma/5.23'.

DRAFT: Fix issues with LayoutManager.insertAtCoordinates

The spacing must be multiplied by two in order to get the correct position


(cherry picked from commit d0479b98b0f0c650e8b57fb5bfba30689b1d80b4)

M  +8    -3    containments/panel/contents/ui/LayoutManager.js

https://invent.kde.org/plasma/plasma-desktop/commit/a47ead6339eb516a2d84a102088eb380ae118c8d
Comment 6 Oleg Solovyov 2022-02-01 14:30:12 UTC
Fix of this bug causes regression: leftmost widgets are moved to the right.
Comment 7 Oleg Solovyov 2022-02-02 07:58:38 UTC
UPD:
@ngraham I think your fix was wrong. If widget.width == 0 then widget.x == 0 (QML bug?) and our candidate is inserted after it.
Comment 8 Nate Graham 2022-02-02 19:50:21 UTC
Can you submit a merge request?