summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOwen Taylor <owt1@cornell.edu>1998-02-19 18:06:29 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-02-19 18:06:29 +0000
commit22a9a454af7d5f6f582b87394d336c5c37becb73 (patch)
tree36854f93fe014dd955b03c49bc11f3283ca1d5f9 /tests
parent62dba86c81debf2677230c674902ddb98ba8e4c2 (diff)
downloadgdk-pixbuf-22a9a454af7d5f6f582b87394d336c5c37becb73.tar.gz
Use POINTER_MOTION_HINT when dragging shapes around. (gtk-wille-980203-0
Thu Feb 19 12:18:24 1998 Owen Taylor <owt1@cornell.edu> * gtk/testgtk.c : Use POINTER_MOTION_HINT when dragging shapes around. (gtk-wille-980203-0 Stefan Wille <1wille@vsys1.informatik.uni-hamburg.de>) * gtk/gtktext.c : Fixes to inserting and deleting characters on line breaks. (gtk-magnus-980210-0 Magnus Hulthen <magnus@axiom.se>)
Diffstat (limited to 'tests')
-rw-r--r--tests/testgtk.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 3579657c7..7718b6c3b 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -3063,7 +3063,8 @@ shape_pressed (GtkWidget *widget, GdkEventButton *event)
gtk_grab_add (widget);
gdk_pointer_grab (widget->window, TRUE,
GDK_BUTTON_RELEASE_MASK |
- GDK_BUTTON_MOTION_MASK,
+ GDK_BUTTON_MOTION_MASK |
+ GDK_POINTER_MOTION_HINT_MASK,
NULL, NULL, 0);
}
@@ -3085,6 +3086,10 @@ shape_motion (GtkWidget *widget,
p = gtk_object_get_user_data (GTK_OBJECT (widget));
+ /*
+ * Can't use event->x / event->y here
+ * because I need absolute coordinates.
+ */
gdk_window_get_pointer (root_win, &xp, &yp, &mask);
gtk_widget_set_uposition (widget, xp - p->x, yp - p->y);
}
@@ -3122,6 +3127,7 @@ shape_create_icon (char *xpm_file,
gtk_widget_set_events (window,
gtk_widget_get_events (window) |
GDK_BUTTON_MOTION_MASK |
+ GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_PRESS_MASK);
gtk_widget_realize (window);