When dragging and dropping a file on to the Launcher, the Launcher icons that are valid drop receptacles don't highlight until the cursor is over the launcher.

Reported by John Lea on 2011-03-02
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ayatana Design
Critical
John Lea
Unity
Medium
Andrea Azzarone
unity (Ubuntu)
Medium
Andrea Azzarone

Bug Description

Update - Implementation test results.

This now works for long sustained drags of files, but for some reason is not consistently triggered by short sharp drags using a trackpad. To reproduce this issue:

1. Make sure Firefox is in the Launcher, and Nautilus is open on a folder containing a .png file

2. 'Left click hold' on the .png file and drag it in a sharp 'drag and stop' action using the trackpad.

Result: the launcher is unaffected 80% of the time. I am assuming this issue is caused is because there is a issue detecting short sharp d&d movements.

The desired resolution would be for the detection of a d&d and the corresponding change in Launcher state to be more rapid, so that drag actions that start and stop inside a timespan of roughly 50ms (or more) are detected.

---------------------------

As soon as the user starts dragging a file, the Launcher icons that are valid drop receptacles should instantly become highlighted. Icons that are not valid drop receptacles should disappear so that only app icons that are valid drop receptacles are shown.

This needs to happen the instant a user starts dragging a file, regardless of the position of the file on the desktop.

====================================

This bug would be an ideal bug for someone to get started hacking on Unity, here's some information:

 * Time to fix: 10h
 * Difficulty: normal
 * Implementation:

Implementation of this feature is evil due to the nature of XDND.

Short version: When a dnd situation is detected, quickly pop up a new X window (using a nux BaseWindow is the simplest method), collect the required DND information for the launcher to make a descision, then pop down the window as quickly as possible.

Long version:

Create a new BaseWindow type class used purely to collect DND information, called DNDCollectionWindow. It will probably have the following methods.

DNDCollectionWindow::DNDCollectionWindow ()
void DNDCollectionWindow::Collect ()
std::list<char *> DNDCollectionWindow::GetUriList ()

and a signal

DNDCollectionWindow::collected

The window should pop down as fast as possible (but still retain the data). Collection will look specifically for a text/uri-list, as that is the only data relevant to the launcher, and retrieve that data directly for processing by the launcher. If no text/uri-list is available, the collected signal will still fire, but GetUriList should return an empty list.

Once the data is retrieved, it can be used by the launcher to shade launcher icons even before the hover starts. It is important to note that even though the launcher already has the data, it should collect the data a second time as the drag enters the launchers own XWindow. This is to ensure the data has not changed in the mean time (it is allowed to under the XDND specification).

 * Where to look: src/Launcher.cpp
 * Workflow information: http://unity.ubuntu.com/getinvolved/

Related branches

lp:~andyrock/unity/dnd-enhancements
Merged into lp:unity at revision 1399
Jason Smith (community): Approve on 2011-08-19
lp:~andyrock/unity/other-dnd-fixes
Merged into lp:unity at revision 1510
Jason Smith (community): Approve on 2011-09-08
John Lea (johnlea) on 2011-03-02
Changed in ayatana-design:
status: New → Fix Committed
importance: Undecided → Critical
assignee: nobody → John Lea (johnlea)
tags: added: udt
David Barth (dbarth) wrote :
Changed in unity:
importance: Undecided → Medium
importance: Medium → Low
status: New → Triaged
milestone: none → 3.8
John Lea (johnlea) wrote :
Changed in ayatana-design:
status: Fix Committed → Fix Released
Didier Roche (didrocks) on 2011-03-04
Changed in unity (Ubuntu):
status: New → Triaged
Didier Roche (didrocks) on 2011-03-28
Changed in unity:
milestone: 3.8 → 3.8.2
Didier Roche (didrocks) on 2011-03-29
Changed in unity:
assignee: nobody → Didier Roche (didrocks)
Didier Roche (didrocks) wrote :

I can't do that one without breaking the compability between nux and unity, which is forbidden at this state of the cycle as well as being dangerous. Setting in the backlog basket.

Technical reason:
void
Launcher::ProcessDndMove (int x, int y, std::list<char *> mimes)
this function is signaled by Nux, and the mimetypes of the dragged element are only available there. We would need to set the mimetype before, which is an ABI and API break in Nux.

Changed in unity:
milestone: 3.8.2 → backlog
assignee: Didier Roche (didrocks) → nobody
Didier Roche (didrocks) wrote :

For further reference: OnUpdateDragManagerTimeout is the destination when most of the code for dnd should be set in case of positive dnd, all but the mimetypes is available there. See http://bazaar.launchpad.net/~didrocks/unity/dnd-with-initial-hilight-poof/revision/1040

Didier Roche (didrocks) on 2011-03-31
tags: added: ffe
Neil J. Patel (njpatel) on 2011-03-31
Changed in unity:
assignee: nobody → Jason Smith (jassmith)
Changed in unity (Ubuntu):
assignee: nobody → Jason Smith (jassmith)
John Lea (johnlea) on 2011-04-19
tags: added: udo
John Lea (johnlea) on 2011-04-20
description: updated
Alex Launi (alexlauni) on 2011-05-05
Changed in unity:
importance: Low → Medium
Jason Smith (jassmith) on 2011-05-05
Changed in unity:
milestone: backlog → ux-backlog-2
Jason Smith (jassmith) on 2011-06-06
description: updated
description: updated
description: updated
Jorge O. Castro (jorge) on 2011-06-06
Changed in unity:
milestone: ux-backlog-2 → backlog
assignee: Jason Smith (jassmith) → Unity Community Hackers (unity-community-hackers)
Jorge O. Castro (jorge) on 2011-06-06
tags: added: backlog
Changed in unity:
assignee: Unity Community Hackers (unity-community-hackers) → Andrea Azzarone (andyrock)
Changed in unity (Ubuntu):
assignee: Jason Smith (jassmith) → Andrea Azzarone (andyrock)
Changed in unity:
status: Triaged → In Progress
Changed in unity (Ubuntu):
status: Triaged → In Progress
Andrea Azzarone (andyrock) wrote :

I'm locked since nux drag and drop doesn't work at the moment.

Omer Akram (om26er) on 2011-08-08
Changed in unity (Ubuntu):
importance: Undecided → Medium
Omer Akram (om26er) on 2011-08-19
Changed in unity:
status: In Progress → Fix Committed
Changed in unity (Ubuntu):
status: In Progress → Fix Committed
Changed in unity:
status: Fix Committed → Fix Released
Changed in unity (Ubuntu):
status: Fix Committed → Fix Released
Omer Akram (om26er) on 2011-08-19
Changed in unity:
status: Fix Released → Fix Committed
John Lea (johnlea) on 2011-08-24
description: updated
John Lea (johnlea) on 2011-08-24
description: updated
Changed in unity:
status: Fix Committed → Confirmed
Changed in unity (Ubuntu):
status: Fix Released → Confirmed
Andrea Azzarone (andyrock) wrote :

@JohnLea: short (or super fast) drag problem should be gone... As soon as possible I make the proposal ;)

Changed in unity:
status: Confirmed → In Progress
Changed in unity (Ubuntu):
status: Confirmed → In Progress
John Lea (johnlea) wrote :

@andyrock

Great, can't wait until it lands ;-)

Jason Smith (jassmith) on 2011-09-08
Changed in unity:
status: In Progress → Fix Released
status: Fix Released → Fix Committed
Changed in unity (Ubuntu):
status: In Progress → Fix Committed
Changed in unity:
status: Fix Committed → Fix Released
Changed in unity (Ubuntu):
status: Fix Committed → Fix Released
John Lea (johnlea) on 2011-09-30
tags: added: reviewedbydesigno
removed: udo udt
Changed in unity:
milestone: backlog → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers