From 65bf3316cf384588453604be6b4f0ed3751a8b0f Mon Sep 17 00:00:00 2001 From: tromey Date: Tue, 9 Jan 2007 19:58:05 +0000 Subject: Merged gcj-eclipse branch to trunk. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120621 138bc75d-0d04-0410-961f-82ee72b054a4 --- .../gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java | 12 +++++++++++- .../gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java | 6 +++--- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'libjava/classpath/gnu/java/awt/dnd') diff --git a/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java b/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java index 4f922982273..b68fa105803 100644 --- a/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java +++ b/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java @@ -61,11 +61,13 @@ public class GtkDragSourceContextPeer private ComponentPeer peer; private Cursor cursor; private DragSourceContext context; + public static Component target; native void nativeStartDrag(Image i, int x, int y, int action, String target); native void connectSignals(ComponentPeer comp); native void create(ComponentPeer comp); native void nativeSetCursor(int cursor); + native void setTarget(GtkDropTargetContextPeer target); public GtkDragSourceContextPeer(DragGestureEvent e) { @@ -76,10 +78,18 @@ public class GtkDragSourceContextPeer create(peer); connectSignals(peer); cursor = comp.getCursor(); + + // FIXME: Where do we set the target? + + if ((target != null)) + setTarget(new GtkDropTargetContextPeer(target)); } ComponentPeer getComponentPeer(Component c) { + if (c == null) + return null; + Component curr = c; while (curr.getPeer() instanceof LightweightPeer) curr = curr.getParent(); @@ -93,7 +103,7 @@ public class GtkDragSourceContextPeer throws InvalidDnDOperationException { this.context = context; - + if (p == null) p = new Point(); diff --git a/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java b/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java index 50cd95d41ad..f24b3f39bcb 100644 --- a/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java +++ b/libjava/classpath/gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java @@ -50,10 +50,10 @@ public class GtkDropTargetContextPeer extends GtkGenericPeer implements DropTargetContextPeer { - - public GtkDropTargetContextPeer() + + public GtkDropTargetContextPeer(Object obj) { - super(null); + super(obj); } public void setTargetActions(int actions) -- cgit v1.2.1