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

Bug 348679

Summary: [DND] DragSourceEvent holds absolute coordinates
Product: [RT] RAP Reporter: Momchil Atanasov <m_momchil>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 1.4   
Target Milestone: 1.5 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Momchil Atanasov CLA 2011-06-08 03:53:39 EDT
When the "dragStart" method of the "DragSourceListener" is called, the "DragSourceEvent" parameter holds absolute coordinates of the event and not ones relative to the control where the event happened.

My exact use case was a TreeViewer inside a SashForm inside a WizardPage .. etc.
I tested the same in RCP and it returned relative coordinates as is stated in the specification. RAP however returns absolute coordinates.
Comment 1 Ivan Furnadjiev CLA 2011-06-08 05:41:34 EDT
I can confirm this by looking into the code - in DNDSupport#processDragStart the DragSourceEvent event is created with "point" object instead of "mappedPoint" object. Probably, DragSourceEvent.DRAG_SET_DATA and DragSourceEvent.DRAG_END suffer from the same issue.
Comment 2 Ivan Furnadjiev CLA 2011-06-10 05:48:46 EDT
To correct myself from comment #1 - according to the documentation only "dragStart" event holds relative coordinates. Fixed in CVS HEAD in DNDSupport#processDragStart.