diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java index 528fc8fd6f..cc63a3b204 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java @@ -315,10 +315,10 @@ private void drag(Event dragEvent) { * area and use it during the drag to prevent the image from being inverted. * On XP if the shell is RTL, the image is not displayed. */ - int offset = event.x - dragEvent.x; + int offsetX = event.offsetX; hwndDrag = topControl.handle; if ((topControl.getStyle() & SWT.RIGHT_TO_LEFT) != 0) { - offset = image.getBounds().width - offset; + offsetX = image.getBounds().width - offsetX; RECT rect = new RECT (); OS.GetClientRect (topControl.handle, rect); hwndDrag = OS.CreateWindowEx ( @@ -334,7 +334,7 @@ private void drag(Event dragEvent) { null); OS.ShowWindow (hwndDrag, OS.SW_SHOW); } - OS.ImageList_BeginDrag(imagelist.getHandle(), 0, offset, event.y - dragEvent.y); + OS.ImageList_BeginDrag(imagelist.getHandle(), 0, offsetX, event.offsetY); /* * Feature in Windows. When ImageList_DragEnter() is called, * it takes a snapshot of the screen If a drag is started |