Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348679 - [DND] DragSourceEvent holds absolute coordinates
Summary: [DND] DragSourceEvent holds absolute coordinates
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 1.5 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 03:53 EDT by Momchil Atanasov CLA
Modified: 2011-06-10 05:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.