summaryrefslogtreecommitdiff
path: root/gtk/gtkrange.c
diff options
context:
space:
mode:
authorOwen Taylor <owt1@cornell.edu>1998-04-14 01:39:40 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-04-14 01:39:40 +0000
commit385164d6f9c34a456667f90a8e7a98782871f08f (patch)
tree5c637d8fb96a5b3d26d5b14eb0d88e3e7788ed04 /gtk/gtkrange.c
parent1bafe5a8e7e247cb1550070b3a725acd3b1f556d (diff)
downloadgtk+-385164d6f9c34a456667f90a8e7a98782871f08f.tar.gz
Don't read the character past the end of the text.
Mon Apr 13 21:40:14 1998 Owen Taylor <owt1@cornell.edu> * gtk/gtktext.c (find_char_width): Don't read the character past the end of the text. * gtk/gtkrange.c (gtk_real_range_timer): If the mouse button has been released before the timer is activated, don't keep on scrolling. * gdk/gdk.c (gdk_event_translate): Filter subsequent configure events after we discard the first. Removed obsolete and sometimes very slow GdkOtherEvent. (Left in gdktypes.h with signal in GTK)
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r--gtk/gtkrange.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 0364227540..a4c50e067a 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -1165,6 +1165,8 @@ gtk_real_range_timer (GtkRange *range)
}
else
{
+ GdkModifierType mods, mask;
+
if (!range->timer)
{
return_val = FALSE;
@@ -1177,8 +1179,26 @@ gtk_real_range_timer (GtkRange *range)
range->need_timer = FALSE;
}
- if (gtk_range_scroll (range, -1))
- return return_val;
+ switch (range->button)
+ {
+ case 1:
+ mask = GDK_BUTTON1_MASK;
+ break;
+ case 2:
+ mask = GDK_BUTTON2_MASK;
+ break;
+ case 3:
+ mask = GDK_BUTTON3_MASK;
+ break;
+ default:
+ mask = 0;
+ break;
+ }
+
+ gdk_window_get_pointer (range->slider, NULL, NULL, &mods);
+
+ if (mods & mask)
+ return_val = gtk_range_scroll (range, -1);
}
return return_val;