Bug 466675

Summary: Dragging files to Icons-Only Task Manager sometimes breaks on X11
Product: [Plasma] plasmashell Reporter: phoenix.apps
Component: Task Manager and Icons-Only Task ManagerAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: david.perez.ingeniero, evskof, nate, phoenix.apps, waqar.17a
Priority: NOR Keywords: regression
Version: 5.27.3   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 5.27.6
Sentry Crash Report:
Attachments: Drag issue recording

Description phoenix.apps 2023-03-01 20:07:10 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open a file manager. Tried with both Dolphin and Gnome Files;
2. Pick any file (extension does not matter);
3. Drag it to Icons-Only Task Manager to the icon of the application which 100% supports dropping. For instance, Firefox, Telegram Desktop, Dolphin or Gnome 

OBSERVED RESULT
Task Manager does not respond to dragging items to it. Application icons "flee" the cursor, as if I am trying to reorder

EXPECTED RESULT
Task manager navigates to the selected window and elevates it (this was already working)

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 6.1.12-200.fc37.x86_64 (64-bit)
(available in About System)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Graphics: AMD Radeon Graphics
Operation Mode: X11 only
Extra info https://invent.kde.org/-/snippets/2523
Comment 1 Nate Graham 2023-03-02 20:07:30 UTC
I can't reproduce the issue on Wayland. Are you 100% sure it's an Icons-Only Task Manager and not a collection of Icon widgets? Can you attach a screen recording that shows the issue?
Comment 2 phoenix.apps 2023-03-03 14:49:18 UTC
Surprisingly enough, I can't reproduce it anymore.
For the past two days since reporting I have not rebooted my PC, only put it to "Sleep" via a KDE Application Launcher menu.

I additionally checked with Icons, and currently dragging there also works as intended.

This is not the first occurrence of this issue, but it is quite rare.
I will write back as soon as I find a case where it triggers the wrong behavior
Comment 3 Bug Janitor Service 2023-03-18 03:45:44 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 phoenix.apps 2023-04-04 14:55:58 UTC
(In reply to Nate Graham from comment #1)
> I can't reproduce the issue on Wayland. Are you 100% sure it's an Icons-Only
> Task Manager and not a collection of Icon widgets? Can you attach a screen
> recording that shows the issue?

After several days of things working as expected, this bug has re-appeared again (sorry it's GDrive, couldn't think of any other long-term file hosting)
https://drive.google.com/file/d/1Qh3pJOGq3WZfJ-TkWc1lQC7HvUXeGKVl/view?usp=share_link

What traces should I add? Most importantly, where can I obtain them?

An idea which comes to my mind is that this may be related to NVIDIA's proprietary drivers I recently installed.
Just in case I collected the info from Info Center (it typically changes a lot when I install NVIDIA drivers): https://invent.kde.org/-/snippets/2571
Comment 5 Waqar Ahmed 2023-04-18 18:33:38 UTC
I can consistently reproduce the issue Plasma 5.27.3, KF 5.104.0, Qt 5.15.8. Attaching a recording
Comment 6 Waqar Ahmed 2023-04-18 18:34:48 UTC
Created attachment 158195 [details]
Drag issue recording
Comment 7 Nate Graham 2023-04-19 17:02:43 UTC
I cannot reproduce that issue on either Wayland or X11 with an Icons-Only Task Manager on Plasma 5.27.4. Dragging .txt or .jpg files from either Dolphin or Folder View, to pinned or unpinned app icons--it all works for me.
Comment 8 Waqar Ahmed 2023-04-24 17:26:16 UTC
can not reproduce with plasma 5.27.4
Comment 9 Nate Graham 2023-04-25 15:14:40 UTC
phoenix.apps@yahoo.com, is it also fixed for you in Plasma 5.27.4?
Comment 10 Bug Janitor Service 2023-05-10 03:46:03 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2023-05-25 03:45:48 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 12 Waqar Ahmed 2023-05-25 05:56:19 UTC
Broken again since a couple of days. I am not sure about the reason, I think something triggers this behavior, not sure what
Comment 13 Nate Graham 2023-05-26 14:28:35 UTC
*** Bug 470164 has been marked as a duplicate of this bug. ***
Comment 14 Bug Janitor Service 2023-05-26 19:04:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1534
Comment 15 Fushan Wen 2023-05-26 19:14:24 UTC
Git commit 24e0d2dcec56051cdd0b4e2ef22b4bb5e1d2d6d7 by Fushan Wen.
Committed on 26/05/2023 at 19:00.
Pushed by fusionfuture into branch 'master'.

applets/taskmanager: avoid updating dragSource when active is false

grabToImage is async, and when an item is grabbed to an image, the drag
operation can be already cancelled. When dragSource is not null,
MouseHandler will always consider the current drag opertion is to move
tasks, which causes the bug.

STR:

1. Drag a file onto a task and hold LMB
2. Press RMB
3. Release RMB
4. Release LMB
5. Drag a file onto a task again
FIXED-IN: 5.27.6

M  +4    -0    applets/taskmanager/package/contents/ui/Task.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/24e0d2dcec56051cdd0b4e2ef22b4bb5e1d2d6d7
Comment 16 Fushan Wen 2023-05-26 19:15:54 UTC
Git commit 42b671f8575d9df27f740c704fe98a0471efbda5 by Fushan Wen.
Committed on 26/05/2023 at 19:15.
Pushed by fusionfuture into branch 'Plasma/5.27'.

applets/taskmanager: avoid updating dragSource when active is false

grabToImage is async, and when an item is grabbed to an image, the drag
operation can be already cancelled. When dragSource is not null,
MouseHandler will always consider the current drag opertion is to move
tasks, which causes the bug.

STR:

1. Drag a file onto a task and hold LMB
2. Press RMB
3. Release RMB
4. Release LMB
5. Drag a file onto a task again
FIXED-IN: 5.27.6


(cherry picked from commit 24e0d2dcec56051cdd0b4e2ef22b4bb5e1d2d6d7)

M  +4    -0    applets/taskmanager/package/contents/ui/Task.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/42b671f8575d9df27f740c704fe98a0471efbda5
Comment 17 Fushan Wen 2023-05-27 16:31:51 UTC
*** Bug 467635 has been marked as a duplicate of this bug. ***