summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd
diff options
context:
space:
mode:
authorDuong Nguyen <dnguyen>2008-07-22 19:00:16 +0000
committerDuong Nguyen <dnguyen>2008-07-22 19:00:16 +0000
commitd9d246eb364431120619874d4f6e316ef38fcc5d (patch)
treebb746e5b06664798f1489436dc65e67078c601f5 /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd
parent1c2c078c2c6ec69adbdea230aea1d80b2c96c464 (diff)
downloadeclipse.platform.swt-d9d246eb364431120619874d4f6e316ef38fcc5d.tar.gz
eclipse.platform.swt-d9d246eb364431120619874d4f6e316ef38fcc5d.tar.xz
eclipse.platform.swt-d9d246eb364431120619874d4f6e316ef38fcc5d.zip
Bug 240817 - SWT Tree: in 3.4, DragSourceEvent gives higher x-coordinate than in 3.3
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/DragSource.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java6
3 files changed, 9 insertions, 9 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
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java
index 727abc40d8..bc25bd33ae 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java
@@ -83,11 +83,11 @@ public class TableDragSourceEffect extends DragSourceEffect {
int DI_GETDRAGIMAGE = OS.RegisterWindowMessage (new TCHAR (0, "ShellGetDragImage", true)); //$NON-NLS-1$
if (OS.SendMessage (control.handle, DI_GETDRAGIMAGE, 0, shdi) != 0) {
if ((control.getStyle() & SWT.MIRRORED) != 0) {
- event.x += shdi.sizeDragImage.cx - shdi.ptOffset.x;
+ event.offsetX = shdi.sizeDragImage.cx - shdi.ptOffset.x;
} else {
- event.x += shdi.ptOffset.x;
+ event.offsetX = shdi.ptOffset.x;
}
- event.y += shdi.ptOffset.y;
+ event.offsetY = shdi.ptOffset.y;
int /*long*/ hImage = shdi.hbmpDragImage;
if (hImage != 0) {
BITMAP bm = new BITMAP ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java
index e39a75684a..645549a14f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java
@@ -82,11 +82,11 @@ public class TreeDragSourceEffect extends DragSourceEffect {
int DI_GETDRAGIMAGE = OS.RegisterWindowMessage (new TCHAR (0, "ShellGetDragImage", true)); //$NON-NLS-1$
if (OS.SendMessage (control.handle, DI_GETDRAGIMAGE, 0, shdi) != 0) {
if ((control.getStyle() & SWT.MIRRORED) != 0) {
- event.x += shdi.sizeDragImage.cx - shdi.ptOffset.x;
+ event.offsetX = shdi.sizeDragImage.cx - shdi.ptOffset.x;
} else {
- event.x += shdi.ptOffset.x;
+ event.offsetX = shdi.ptOffset.x;
}
- event.y += shdi.ptOffset.y;
+ event.offsetY = shdi.ptOffset.y;
int /*long*/ hImage = shdi.hbmpDragImage;
if (hImage != 0) {
BITMAP bm = new BITMAP ();