Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-02-17 08:43:22 +0000
committerAlexander Kurtakov2018-02-17 08:58:40 +0000
commit70f387a1563eef80fa412a4911dd5698e3a61860 (patch)
treea02a1361ac67773a666a1601938400e980a9ab80 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk
parent5c341b76570ceaddabc473b515570c12ff349d1c (diff)
downloadeclipse.platform.swt-70f387a1563eef80fa412a4911dd5698e3a61860.tar.gz
eclipse.platform.swt-70f387a1563eef80fa412a4911dd5698e3a61860.tar.xz
eclipse.platform.swt-70f387a1563eef80fa412a4911dd5698e3a61860.zip
Bug 530387 - [GTK3] Replace deprecated
gdk_device_manager_get_client_pointer() Retrieve pointer from GdkSeat on Gtk 3.20+. Change-Id: I39c148ebd00ccde9e3b0823d2dd92b387bee322b Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
index 84fc1bf5c5..aeba7b06bd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java
@@ -2738,7 +2738,14 @@ public class GDK extends OS {
}
}
-
-
+ public static long /*int*/ gdk_get_pointer (long /*int*/ display) {
+ if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
+ long /*int*/ default_seat = GDK.gdk_display_get_default_seat(display);
+ return GDK.gdk_seat_get_pointer(default_seat);
+ } else {
+ long /*int*/ device_manager = GDK.gdk_display_get_device_manager(display);
+ return GDK.gdk_device_manager_get_client_pointer(device_manager);
+ }
+ }
}

Back to the top