diff options
author | Owen Taylor <owt1@cornell.edu> | 1998-03-07 06:14:37 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-03-07 06:14:37 +0000 |
commit | a328473d1b9f2eccba6a058bcd2ad02efab9dea2 (patch) | |
tree | 41667251cd5fad715d0b04e2486d12534714025a /gtk/gtkrange.c | |
parent | 1941bf4cbf30ba6a0b63ae2f881a6f7d6c13a677 (diff) | |
download | gdk-pixbuf-a328473d1b9f2eccba6a058bcd2ad02efab9dea2.tar.gz |
Fixed the vscrollbar flickering problem, by checking the area on expose
Sat Mar 7 01:07:24 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkrange.c (gtk_range_expose): Fixed the vscrollbar
flickering problem, by checking the area on expose events.
(There was a hscrollbar flickering problem as well, it
just wasn't very noticeable)
Diffstat (limited to 'gtk/gtkrange.c')
-rw-r--r-- | gtk/gtkrange.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index db39373d1..95beaa0b4 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -688,7 +688,22 @@ gtk_range_expose (GtkWidget *widget, if (event->window == range->trough) { - gtk_range_draw_trough (range); + /* Don't redraw if we are only exposing the literal trough region. + * this may not work correctly if someone overrides the default + * trough-drawing handler. (Probably should really pass another + * argument - the redrawn area to all the drawing functions) + */ + + gint xt = widget->style->klass->xthickness; + gint yt = widget->style->klass->ythickness; + + if (!((event->area.x >= xt) && + (event->area.y >= yt) && + (event->area.x + event->area.width <= + widget->allocation.width - xt) && + (event->area.y + event->area.height <= + widget->allocation.height - xt))) + gtk_range_draw_trough (range); } else if (event->window == widget->window) { |