diff options
author | Anatoly Spektor | 2012-08-30 19:04:37 +0000 |
---|---|---|
committer | Arun Thondapu | 2012-09-28 12:42:11 +0000 |
commit | d09696dd083310684def500d9edb9cfc5d6dd4ab (patch) | |
tree | 8b1196f49286e1660de2fa84ec5347dfc9306d63 /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java | |
parent | 7a617d8b29a0a612c98003cb9099decc03b18770 (diff) | |
download | eclipse.platform.swt-d09696dd083310684def500d9edb9cfc5d6dd4ab.tar.gz eclipse.platform.swt-d09696dd083310684def500d9edb9cfc5d6dd4ab.tar.xz eclipse.platform.swt-d09696dd083310684def500d9edb9cfc5d6dd4ab.zip |
Bug 388528 Use gdk_device_ungrab() instead of gdk_pointer_ungrab() in GTK3+
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java index f2c713ec68..d955029fd6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java @@ -315,7 +315,14 @@ void dragEnd(long /*int*/ widget, long /*int*/ context){ * NOTE: We believe that it is never an error to ungrab when * a drag is finished. */ - OS.gdk_pointer_ungrab(OS.GDK_CURRENT_TIME); + if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) { + long /*int*/ display = OS.gdk_window_get_display (OS.gtk_widget_get_window(widget)); + long /*int*/ device_manager = OS.gdk_display_get_device_manager (display); + long /*int*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager); + OS.gdk_device_ungrab(pointer, OS.GDK_CURRENT_TIME); + } else { + OS.gdk_pointer_ungrab(OS.GDK_CURRENT_TIME); + } OS.gdk_keyboard_ungrab(OS.GDK_CURRENT_TIME); int operation = DND.DROP_NONE; |