Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348609

Summary: Drag start fails on Linux and Mac
Product: [Eclipse Project] e4 Reporter: Eric Moffatt <emoffatt>
Component: UIAssignee: Eric Moffatt <emoffatt>
Status: RESOLVED FIXED QA Contact: Eric Moffatt <emoffatt>
Severity: major    
Priority: P3 CC: gheorghe, Mike_Wilson, remy.suen
Version: unspecifiedFlags: emoffatt: pmc_approved?
gheorghe: review+
Target Milestone: 4.1 RC4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch to use DragDetect events to start the drag none

Description Eric Moffatt CLA 2011-06-07 12:47:28 EDT
The basic issues was that we were using 'hand rolled' display filters to start the drag. On Linux this failed because the eventing is asynchronous but the 'DnDInfo' was always set using the Display methods (i.e. getCursorControl(), getCursorLocation()...). By the time the mouse down event arrived the cursor had already been moved to a location where the element under (likely a part) was not a valid 'draggable' element...

Selineo fixed me up with the correct pattern which is to use the 'dragDetect' event instead.
Comment 1 Eric Moffatt CLA 2011-06-07 12:52:33 EDT
Created attachment 197521 [details]
Patch to use DragDetect events to start the drag


This patch removes *all* the display filters (a very good thing) and replaces them with a model listener that adds a 'dragDetect' listener to all rendered MPartStack's CTF.

While this is cleaner we'll have to revisit this post-4.1 since the 'pure Tracker' approach this patch uses *cannot* support more dynamic DnD operations (like 'hosted' drags...).
Comment 2 Eric Moffatt CLA 2011-06-07 15:09:35 EDT
Committed in >20110607. Applied the patch.

This has been tested but should be verified once the new build comes out...
Comment 3 Eric Moffatt CLA 2011-06-07 15:09:56 EDT
Marking FIXED.
Comment 4 Remy Suen CLA 2011-06-08 08:45:48 EDT
(In reply to comment #1)
> Created attachment 197521 [details]
> Patch to use DragDetect events to start the drag

This change has caused a regression when trying to split yourself in the shared area, see bug 348720.