diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java index c9cc25ade2..eeb43d3019 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java @@ -771,8 +771,12 @@ boolean setEventData(int /*long*/ context, int x, int y, int time, DNDEvent even } } if (dataTypes.length == 0) return false; - - int /*long*/ window = OS.GTK_WIDGET_WINDOW(control.handle); + int /*long*/ window; + if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){ + window = OS.gtk_widget_get_window (control.handle); + } else { + window = OS.GTK_WIDGET_WINDOW(control.handle); + } int [] origin_x = new int[1], origin_y = new int[1]; OS.gdk_window_get_origin(window, origin_x, origin_y); Point coordinates = new Point(origin_x[0] + x, origin_y[0] + y); |