Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2016-03-08 05:54:19 +0000
committerNiraj Modi2016-03-08 05:54:19 +0000
commitdbe994c9a3b8ed96e87c3fa9e4a6b538d5d00b34 (patch)
tree54295d2b85991566fd5a003e06b235c1d8ce70ef
parent6c9e513009c0ac3103601e9cd15716a96b33b02e (diff)
downloadeclipse.platform.swt-dbe994c9a3b8ed96e87c3fa9e4a6b538d5d00b34.tar.gz
eclipse.platform.swt-dbe994c9a3b8ed96e87c3fa9e4a6b538d5d00b34.tar.xz
eclipse.platform.swt-dbe994c9a3b8ed96e87c3fa9e4a6b538d5d00b34.zip
Win32(Part17): Changing API's coordinate system from Pixels to Points.
- Fixed Crash issue in Table/Tree seen with DNDExample/Snippet91.java Change-Id: Ica8e025232eba3381e1387dff8ce2ea31a7b6e58 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java3
2 files changed, 4 insertions, 2 deletions
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 ce147f1d7a..5eb5319d21 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
@@ -13,6 +13,7 @@ package org.eclipse.swt.dnd;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.DPIUtil.*;
import org.eclipse.swt.internal.win32.*;
import org.eclipse.swt.widgets.*;
@@ -143,7 +144,7 @@ public class TableDragSourceEffect extends DragSourceEffect {
} else {
data.transparentPixel = shdi.crColorKey << 8;
}
- dragSourceImage = new Image(control.getDisplay(), data);
+ dragSourceImage = new Image(control.getDisplay(), new AutoScaleImageDataProvider(data, DPIUtil.getDeviceZoom()));
OS.SelectObject (memHdc, oldMemBitmap);
OS.DeleteDC (memHdc);
OS.DeleteObject (memDib);
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 8ffd1f4f9d..a0e6e99d0e 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
@@ -13,6 +13,7 @@ package org.eclipse.swt.dnd;
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.DPIUtil.*;
import org.eclipse.swt.internal.win32.*;
import org.eclipse.swt.widgets.*;
@@ -142,7 +143,7 @@ public class TreeDragSourceEffect extends DragSourceEffect {
} else {
data.transparentPixel = shdi.crColorKey << 8;
}
- dragSourceImage = new Image (control.getDisplay (), data);
+ dragSourceImage = new Image (control.getDisplay (), new AutoScaleImageDataProvider(data, DPIUtil.getDeviceZoom()));
OS.SelectObject (memHdc, oldMemBitmap);
OS.DeleteDC (memHdc);
OS.DeleteObject (memDib);

Back to the top