[TaskManager] Press and Hold for 800ms to trigger a drag
AbandonedPublic

Authored by Zren on May 27 2018, 6:55 PM.

Details

Reviewers
None
Summary

This prevents the user from accidentally dragging a .desktop file into their browser.

BUG: 390034

Alternative #1: Cancel the drag if the mouse leaves the taskmanager area in under 800ms since the mouse was pressed. This lets you quickly rearrange tasks, but requires "copying" the .desktop file to be deliberate.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
Zren created this revision.May 27 2018, 6:55 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 27 2018, 6:55 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
Zren requested review of this revision.May 27 2018, 6:55 PM

Please don't link to reddit. We do not do development on social media.

Is it necessary to drop the distance threshold?

Question/alternative proposal as I don't like any regressions.

The main problem is we have a data under the mimetype text/url which is why apps keep processing it.
We use this data for drag and drop to pins/desktop but couldn't data that be under a custom x-plasma/asdfasdf mimetype if we also ported the other bit(s) of code to accept that.

ngraham added a subscriber: ngraham.EditedMay 28 2018, 2:42 AM

Maybe we need to stand back and get specific about what we're trying to support with the ability to drag-and-drop apps from the Task manager. Then we can figure whether or not that's actually valuable for our users, and if so, what's the best way to provide it while not causing problems of the sort detailed in https://bugs.kde.org/show_bug.cgi?id=390034.

hein added a subscriber: hein.EditedMay 28 2018, 11:00 AM

I like David's idea. It risks breaking interoperability with third-party things, but that's an inherent conflict in ... wanting to break interoperability with third-party things.

hein added a comment.May 28 2018, 11:27 AM

@Zren Would you be OK with abandoning this patch (which I btw got close to accepting before I read David's comment, so thanks for your persistence on this)? I would then have a go at implementing David's idea today / this week.

Zren abandoned this revision.May 28 2018, 1:38 PM

No prob.

So under that proposal, the visible drag would still happen, but not do anything if you drop on an app instead of a containment, right?

Functionally, that'll probably fix the bug, but I don't expect the user complaints to abate, just change to "Why can I uselessly drag my task manager entries?"

I still think this deserves a larger discussion regarding whether dragging apps from task manager tasks onto panels or the desktop is a use case that we ought to tiptoe around so much. Is it really such a common use case?

hein added a comment.May 28 2018, 6:00 PM

This patch was going to add a press-and-hold delay for any task DND, which would also slow down rearranging tasks by DND. The proposed alternative would break the feature of dropping tasks onto the pager to move them to a different virtual desktop or activity. There's also DND features that haven't been implemented yet but should be, like e.g. spring-loading Kicker during DND so you can add an app to the favorites via DND.