summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2003-09-05 15:32:12 +0000
committerVeronika Irvine <veronika>2003-09-05 15:32:12 +0000
commit02c0962d3ecfa4815336b69d17b9ecb5bf7b8e0d (patch)
tree6a3d77e1caf4c703cf84a7446653eaf9092a3c12
parent138cff8bf2f19bed50c70dced0efd3e17cb172e2 (diff)
downloadeclipse.platform.swt-02c0962d3ecfa4815336b69d17b9ecb5bf7b8e0d.tar.gz
eclipse.platform.swt-02c0962d3ecfa4815336b69d17b9ecb5bf7b8e0d.tar.xz
eclipse.platform.swt-02c0962d3ecfa4815336b69d17b9ecb5bf7b8e0d.zip
bug 35826
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DropTarget.java28
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java1
2 files changed, 9 insertions, 20 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DropTarget.java
index 1c15570376..8afa7f3b4e 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/motif/org/eclipse/swt/dnd/DropTarget.java
@@ -150,29 +150,17 @@ public DropTarget(Control control, int style) {
break;
}
case SWT.Show: {
- Display display = event.display;
- display.asyncExec(new Runnable() {
- public void run() {
- if (DropTarget.this.control == null ||
- DropTarget.this.control.isDisposed() ||
- !DropTarget.this.control.isVisible()) return;
-
- registerDropTarget();
- }
- });
+ if (!registered) {
+ registerDropTarget();
+ } else {
+ int[] args = new int[]{OS.XmNdropSiteActivity, OS.XmDROP_SITE_ACTIVE,};
+ OS.XmDropSiteUpdate(DropTarget.this.control.handle, args, args.length/2);
+ }
break;
}
case SWT.Hide: {
- Display display = event.display;
- display.asyncExec(new Runnable() {
- public void run() {
- if (DropTarget.this.control == null ||
- DropTarget.this.control.isDisposed() ||
- DropTarget.this.control.isVisible()) return;
-
- unregisterDropTarget();
- }
- });
+ int[] args = new int[]{OS.XmNdropSiteActivity, OS.XmDROP_SITE_INACTIVE,};
+ OS.XmDropSiteUpdate(DropTarget.this.control.handle, args, args.length/2);
break;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java
index 8112f2762f..0cf527c5e3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/motif/org/eclipse/swt/internal/motif/OS.java
@@ -608,6 +608,7 @@ public class OS {
public static final byte XmDROP_MOVE = (1 << 0);
public static final byte XmDROP_NOOP = 0;
public static final int XmDROP_SITE_ACTIVE = 0;
+ public static final int XmDROP_SITE_INACTIVE = 1;
public static final int XmDROP_SITE_INVALID = 2;
public static final int XmDROP_SITE_VALID = 3;
public static final int XmDROP_SITE_COMPOSITE = 1;