Bug 396011 - Dragging icons doesn't work most of the time
Summary: Dragging icons doesn't work most of the time
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop Containment (show other bugs)
Version: 5.14.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: Sebastian Kügler
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords:
: 395491 399489 402606 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-30 06:12 UTC by David Korth
Modified: 2019-02-05 19:02 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.56


Attachments
Video2 (89.06 KB, video/mp4)
2018-10-23 06:23 UTC, trmdi
Details
Video3 (146.32 KB, video/x-matroska)
2018-11-02 09:45 UTC, trmdi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Korth 2018-06-30 06:12:41 UTC
When dragging a file icon on the desktop in Folder View, the mouse cursor quickly alternates between the "Forbidden" cursor and the drag cursor. If I release the mouse button while it shows the Forbidden cursor, it ends up doing nothing. If I release the mouse button while it shows the drag cursor, the icon is moved as expected.

Unless I'm being careful, most of the time the cursor is the Forbidden cursor, which basically breaks moving desktop icons.
Comment 1 Nate Graham 2018-07-02 00:37:28 UTC
Not able to reproduce with git master on Neon.
Comment 2 Kai Uwe Broulik 2018-07-02 06:38:24 UTC
Looks like a Qt bug and affects all places using Qml and drag and drop, e.g. dragging a file from Dolphin to the wallpaper dialog also shows the same erratic changing between accepted and denied cursor
Comment 3 David Korth 2018-07-02 17:50:20 UTC
I'm using Qt 5.11.1. I'll file a bug upstream.
Comment 4 Nate Graham 2018-07-03 17:05:22 UTC
Thanks! Please mention the Qt bug report URL here, and let's see what shakes out there. We can always re-open this if there's anything we need to do on our side.
Comment 5 David Korth 2018-07-03 18:01:59 UTC
Upstream bug: https://bugreports.qt.io/browse/QTBUG-69246

Going to try creating a minimal test case, though I don't have too much experience with QML / Qt Quick.
Comment 6 Nate Graham 2018-07-03 21:04:48 UTC
Thank you!
Comment 7 Nate Graham 2018-10-09 19:12:53 UTC
*** Bug 395491 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2018-10-09 19:13:01 UTC
*** Bug 399489 has been marked as a duplicate of this bug. ***
Comment 9 Patrick Silva 2018-10-21 23:10:22 UTC
upstream bug was closed because requested info was not provided. :(
Comment 10 Nate Graham 2018-10-22 23:59:38 UTC
Eike, any chance you could take a look here when you get some breathing room?
Comment 11 trmdi 2018-10-23 03:34:45 UTC
(In reply to Patrick Silva from comment #9)
> upstream bug was closed because requested info was not provided. :(

I can not reproduce the bug on that example.
But the bug still happens on Plasma 5.14.0 / openSUSE Tumbleweed
Comment 12 trmdi 2018-10-23 04:04:40 UTC
(In reply to trmdi from comment #11)
> (In reply to Patrick Silva from comment #9)
> > upstream bug was closed because requested info was not provided. :(
> 
> I can not reproduce the bug on that example.
> But the bug still happens on Plasma 5.14.0 / openSUSE Tumbleweed

This means it's a Plasma bug ?
Comment 13 Eike Hein 2018-10-23 05:42:31 UTC
Unfortunately I've never encountered this problem on any of my systems. Qt 5.12, though.
Comment 14 trmdi 2018-10-23 06:08:52 UTC
(In reply to Eike Hein from comment #13)
> Unfortunately I've never encountered this problem on any of my systems. Qt
> 5.12, though.

Just tried again. It doesn't happen with Folder view layout, but it does happen with Desktop Containment.
Comment 15 Eike Hein 2018-10-23 06:14:44 UTC
I'm not sure I understand the bug report then, you may need to clarify for me. The original report talks about "When dragging a file icon on the desktop in Folder View". So you're talking a Folder View widget on top of Desktop Containment? Icons aren't movable in FV widgets. Or do you mean Icon widgets on top of Desktop Containment, and the original report is wrong?
Comment 16 trmdi 2018-10-23 06:16:06 UTC
(In reply to Eike Hein from comment #15)
> I'm not sure I understand the bug report then, you may need to clarify for
> me. The original report talks about "When dragging a file icon on the
> desktop in Folder View". So you're talking a Folder View widget on top of
> Desktop Containment? Icons aren't movable in FV widgets. Or do you mean Icon
> widgets on top of Desktop Containment, and the original report is wrong?

See the video: https://bugs.kde.org/show_bug.cgi?id=395491
Comment 17 trmdi 2018-10-23 06:23:27 UTC
Created attachment 115843 [details]
Video2

Summary:
- Drag a file from Dolphin -> Desktop (Folder view layout) -> work 100%
- Drag a file from Dolphin -> Desktop (Desktop containment layout) -> too difficult - Video: https://bugs.kde.org/show_bug.cgi?id=395491
- Drag an icon on Desktop (Folder view layout) from one place to another one -> too difficult - Video: [Video2]
Comment 18 Eike Hein 2018-10-23 06:28:05 UTC
Thanks.

I'll try to reproduce the Dolphin-related cases later.

Dragging on FV is easy here, though.
Comment 19 trmdi 2018-11-02 09:30:45 UTC
A new case:
- Add widgets to the Plasma panel
Comment 20 trmdi 2018-11-02 09:45:05 UTC
Created attachment 116043 [details]
Video3

Video3: add a widget to the Plasma panel is so difficult !!!
Comment 21 Nate Graham 2018-11-03 18:19:52 UTC
Possible patch: https://phabricator.kde.org/D16643
Comment 22 David Korth 2018-11-03 18:29:15 UTC
Patch D16643 fixes the issue for me for both desktop and panel widgets.

Using KF 5.51, Plasma 5.14.2, and Qt 5.11.2.
Comment 23 trmdi 2018-12-27 14:50:10 UTC
*** Bug 402606 has been marked as a duplicate of this bug. ***
Comment 24 smasha01 2019-01-31 23:44:01 UTC
Patch D16643 fixes the issue for me as well.

Manjaro 18.0.2
qt 5.12.0-3.0
plasma 5.14.5-2

Thanks trmdi
Comment 25 Fabian Vogt 2019-02-05 18:56:11 UTC
Git commit 856672f370fb32c7a3c3d1a13d873fb8b767d0e8 by Fabian Vogt, on behalf of Tranter Madi.
Committed on 05/02/2019 at 18:55.
Pushed by fvogt into branch 'master'.

Correct the accept flag of the event object on DragMove

Summary:
  - `m_enabled` or `m_temporaryInhibition` could change while DragMove, so we should place `setAccepted()` on top of the function body. Otherwise, the accept flag of `event` could be wrong in the case `m_enabled` or `m_temporaryInhibition` changes while DragMove.
  - Don't call `setAccepted(false)` wrongly if `event->pos() == m_oldDragMovePo`

Test Plan:
- Drag a file from Dolphin -> Desktop (Desktop containment layout) -> too difficult -> fixed
- Drag an icon on Desktop (Folder view layout) from one place to another one -> too difficult -> fixed
- Add widgets to the Plasma panel -> too difficult -> fixed
- Drag a file from Dolphin -> Desktop (Folder view layout) -> still easy

Reviewers: mart, broulik, #plasma, hein, bruns

Reviewed By: mart, #plasma

Subscribers: fvogt, aacid, bruns, dkorth, ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D16643

M  +2    -3    src/qmlcontrols/draganddrop/DeclarativeDropArea.cpp

https://commits.kde.org/kdeclarative/856672f370fb32c7a3c3d1a13d873fb8b767d0e8
Comment 26 Nate Graham 2019-02-05 19:02:18 UTC
Nice job, a great fix!