diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-08-03 10:07:07 -0400 |
---|---|---|
committer | Arun Thondapu <arunkumar.thondapu@in.ibm.com> | 2012-08-06 17:49:12 +0530 |
commit | 31b7a613958123368d896ee9b0a636412f2a598b (patch) | |
tree | 8733974da7d036726370ceac33b28dad40240962 /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop | |
parent | 2c810dc09ebe584d949d1446e7fe61dd64fa3e80 (diff) | |
download | eclipse.platform.swt-31b7a613958123368d896ee9b0a636412f2a598b.tar.gz eclipse.platform.swt-31b7a613958123368d896ee9b0a636412f2a598b.tar.xz eclipse.platform.swt-31b7a613958123368d896ee9b0a636412f2a598b.zip |
Bug 386145 Use gtk_widget_get_window() instead of GTK_WIDGET_WINDOW in newer GTK+
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop')
-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); |