Bug 465377

Summary: Sometimes, drag'n'drop of entries in the task bar stops working
Product: [Plasma] plasmashell Reporter: Ralf Jung <post>
Component: Task Manager and Icons-Only Task ManagerAssignee: Plasma Bugs List <plasma-bugs>
Severity: normal CC: maris.kde, nate
Priority: NOR    
Version: 5.26.90   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.0

Description Ralf Jung 2023-02-06 16:19:44 UTC

I have the task bar configured to "custom" sorting so that I can drag'n'drop the windows the way I like. However, sometimes that just stops working -- when I click and press and drag an entry in the taskbar, it no longer enters the usual drag'n'drop mode.

I have no idea how to get plasma in that state. It probably has to do with switching back and forth between having an external screen connected, and no external screen. I only started seeing this the last few weeks, until around 5.26.0 this did not happen.

Operating System: Debian GNU/Linux 
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-2-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Xeon® CPU E3-1505M v5 @ 2.80GHz
Memory: 31,2 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics P530
Manufacturer: LENOVO
Product Name: 20ENCTO1WW
System Version: ThinkPad P50

Comment 1 Ralf Jung 2023-02-07 12:25:34 UTC
I wonder if this is the same underlying cause as https://bugs.kde.org/show_bug.cgi?id=442321 - is some modifier key getting stuck?
Comment 2 Nate Graham 2023-02-07 18:57:33 UTC
Could be. The next time this happens, can you see if mashing the modifier keys makes it get unstuck? If so, it's probably got the same root cause as Bug 442321.

Also can you confirm whether you're using 5.26.5 (i.e. the last released Plasma version) or 5.26.90 (i.e. the Plasma 5.27 beta)?
Comment 3 Ralf Jung 2023-02-07 20:19:57 UTC
I'm currently on the beta, according to the system info screen.
Comment 4 Māris Nartišs 2023-09-19 08:18:34 UTC
I observed similar issue. At startup after desktop loading has finished, I could not drag'n'drop task manager items. I managed to track down steps to reproduce – when previously running applications were restored to a virtual desktop and they consisted of only three Firefox windows, rearranging would not work, but when restored windows contained also another application (Dolphin, Konsole, ..), rearranging works.

I am not familiar with QML, but it seems that if animation is canceled, TaskList PropertyAction doesn't get run and thus "animating" property is always stuck as being true. This means that onDragMove in MouseHandler.qml always will skip as the first test is to check if animating is true and then skip the rest of function.
Solution that works for me is to add "target.animating = false;" line to onDragEnter in MouseHandler.qml.

Sorry for such a messy description. QML and Plasma internals are black maigck for me.
plasma-desktop 4:5.27.8-1
libqt5qml5:amd64 5.15.10+dfsg-2
Comment 5 Nate Graham 2023-09-19 15:56:27 UTC
Ralf, does that match what's happening for you as well?

Māris, good catch! Would you like to submit a merge request with that change in it?
Comment 6 Ralf Jung 2023-09-19 18:08:13 UTC
I think in my case it was probably the stuck modifier key issue.
Comment 7 Nate Graham 2023-09-20 17:22:38 UTC
Ok, thanks!

*** This bug has been marked as a duplicate of bug 442321 ***
Comment 8 Fushan Wen 2024-02-17 10:12:59 UTC
Git commit 9d6f3cee2f87284687c2907949a961ed15dcb75f by Fushan Wen.
Committed on 17/02/2024 at 10:12.
Pushed by fusionfuture into branch 'Plasma/6.0'.

🍒applets/taskmanager: reset animating property on mouse enter

TaskList Grid move during a SequentialAnimation sets an later removes
"animating" property. Sometimes (e.g. session restore) this animation
fails to complete and then "animating" property remains true. This
prevents drag'n'drop with mouse, as MouseHandler onPositionChanged
skips everything if "animating" property is set.

(cherry picked from commit 67886ca2be7f83c2c3319c5cd1c67b8447411133)

M  +1    -0    applets/taskmanager/package/contents/ui/MouseHandler.qml