summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
diff options
context:
space:
mode:
authorAnatoly Spektor <aspektor@redhat.com>2012-09-20 14:43:08 -0400
committerAnatoly Spektor <aspektor@redhat.com>2012-09-20 14:43:08 -0400
commit909e407d83db506024d7886ba3d14065e4957743 (patch)
treea9abcfc2ddbf45f3175146f357f2e921177d7e6b /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
parentb4cb6fedd5e033c160eed2842a6ba8b09aa3352c (diff)
downloadeclipse.platform.swt-909e407d83db506024d7886ba3d14065e4957743.tar.gz
eclipse.platform.swt-909e407d83db506024d7886ba3d14065e4957743.tar.xz
eclipse.platform.swt-909e407d83db506024d7886ba3d14065e4957743.zip
Replace gdk_window_get_pointer with gdk_window_get_device_position GTK3gtk3_window_get_device_position
This patch replaces gdk_window_get_pointer with gdk_window_get_device_position for GTK+ 3 and higher
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 91407953dd..79f61985a5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -336,7 +336,7 @@ void hookEvents () {
int /*long*/ hoverProc (int /*long*/ widget) {
int [] x = new int [1], y = new int [1], mask = new int [1];
- OS.gdk_window_get_pointer (0, x, y, mask);
+ gdk_window_get_device_position (0, x, y, mask);
sendMouseEvent (SWT.MouseHover, 0, /*time*/0, x [0], y [0], false, mask [0]);
/* Always return zero in order to cancel the hover timer */
return 0;
@@ -2248,7 +2248,7 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean
quit = true;
}
int [] newX = new int [1], newY = new int [1];
- OS.gdk_window_get_pointer (gdkMotionEvent.window, newX, newY, null);
+ gdk_window_get_device_position (gdkMotionEvent.window, newX, newY, null);
break;
}
case OS.GDK_KEY_PRESS:
@@ -3105,7 +3105,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) {
if (gdkEvent.is_hint != 0) {
int [] pointer_x = new int [1], pointer_y = new int [1], mask = new int [1];
int /*long*/ window = eventWindow ();
- OS.gdk_window_get_pointer (window, pointer_x, pointer_y, mask);
+ gdk_window_get_device_position (window, pointer_x, pointer_y, mask);
x = pointer_x [0];
y = pointer_y [0];
state = mask [0];
@@ -3117,7 +3117,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) {
int /*long*/ gtk_popup_menu (int /*long*/ widget) {
if (!hasFocus()) return 0;
int [] x = new int [1], y = new int [1];
- OS.gdk_window_get_pointer (0, x, y, null);
+ gdk_window_get_device_position (0, x, y, null);
return showMenu (x [0], y [0], SWT.MENU_KEYBOARD) ? 1 : 0;
}