summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCST 1998 Shawn T. Amundson <amundson@gimp.org>1998-01-17 22:48:31 +0000
committerShawn Amundson <amundson@src.gnome.org>1998-01-17 22:48:31 +0000
commit2e99581612d53f9bf63e8bfb7403954231d99c24 (patch)
treedd7ebae58b9c7f6a87e1f0abb3b326291b5d2295 /tests
parent8d721e5b7571526e498a275fa53179f8741e9abd (diff)
downloadgtk+-2e99581612d53f9bf63e8bfb7403954231d99c24.tar.gz
Applied patch from <lupus@lettere.unipd.it> which adds
Sat Jan 17 13:26:15 CST 1998 Shawn T. Amundson <amundson@gimp.org> * gtk/gtkentry.[ch]: Applied patch from <lupus@lettere.unipd.it> which adds gtk_entry_set_max_length function. This was part of gtk-lupus-970112-0. * gtk/testgtk.c: Applied gtk-wille-980113-0 which fixes a problem with a shaped widget keeping grab forever when double clicked. * docs/gtk.texi: patch from Gregory McLean <gregm@randomc.com> to add some on aspect_frame, button_box, and color_selection widgets
Diffstat (limited to 'tests')
-rw-r--r--tests/testgtk.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 4d618ac866..b3bf187cf9 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -2736,12 +2736,17 @@ static GtkWidget *rings = NULL;
typedef struct _cursoroffset {gint x,y;} CursorOffset;
static void
-shape_pressed (GtkWidget *widget)
+shape_pressed (GtkWidget *widget, GdkEventButton *event)
{
CursorOffset *p;
+ /* ignore double and triple click */
+ if (event->type != GDK_BUTTON_PRESS)
+ return;
+
p = gtk_object_get_user_data (GTK_OBJECT(widget));
- gtk_widget_get_pointer (widget, &(p->x), &(p->y));
+ p->x = (int) event->x;
+ p->y = (int) event->y;
gtk_grab_add (widget);
gdk_pointer_grab (widget->window, TRUE,