Bug 446814

Summary: Pressing escape while dragging an applet causes it to get stuck
Product: [Plasma] plasmashell Reporter: Waldo <pugonfireyt>
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: isma.af, nate
Priority: NOR    
Version: 5.23.4   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.24

Description Waldo 2021-12-11 06:09:39 UTC
SUMMARY
***
See title. The applet can't be interacted with afterward.
***


STEPS TO REPRODUCE
1. Create a new panel so you don't mess up your current one.
2. Enter edit mode.
3. Start dragging e.g. the system tray to the center.
4. Press and release the escape key.

OBSERVED RESULT
The applet stays where it was when pressing escape.

EXPECTED RESULT
The applet should take the place of the placeholder.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.22 and 5.23.4
KDE Frameworks Version: 5.88
Qt Version: 5.15
Comment 1 Bug Janitor Service 2021-12-12 02:46:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/742
Comment 2 Ismael Asensio 2021-12-16 20:54:45 UTC
Git commit 71a017faf3e817d857ce06fae0f52242ad2c6143 by Ismael Asensio.
Committed on 16/12/2021 at 20:50.
Pushed by iasensio into branch 'master'.

containments/panel: Fix state when dragging gets canceled

In panel edition, when dragging an applet to reorder the layout,
we were not handling the case when the dragging operation gets
canceled.

Dragging cancelation can be triggered by pressing <Esc> or other
focus-intrusive operations like a delayed screenshot.

This led to an unconsistent state of the panel where the dragged
applet would just stay out the layout, floating in the last
position it was dragged to.

For now, acting on the `canceled` signal just as if the dragging
was `released` seems the simpler to avoid a messed-up panel.

M  +6    -2    containments/panel/contents/ui/ConfigOverlay.qml

https://invent.kde.org/plasma/plasma-desktop/commit/71a017faf3e817d857ce06fae0f52242ad2c6143