diff --git a/ChangeLog b/ChangeLog index 295e2b7174..4444bffbb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 1 20:09:31 2001 Owen Taylor + + * gtk/gtkrange.c: Patch from George Lebl to + fix division by zero for full scroll bars. (#62114) + Thu Nov 1 19:56:40 2001 Owen Taylor * gtk/gtkmain.c (gtk_main_do_event): ref/unref diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 295e2b7174..4444bffbb1 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Thu Nov 1 20:09:31 2001 Owen Taylor + + * gtk/gtkrange.c: Patch from George Lebl to + fix division by zero for full scroll bars. (#62114) + Thu Nov 1 19:56:40 2001 Owen Taylor * gtk/gtkmain.c (gtk_main_do_event): ref/unref diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 295e2b7174..4444bffbb1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Thu Nov 1 20:09:31 2001 Owen Taylor + + * gtk/gtkrange.c: Patch from George Lebl to + fix division by zero for full scroll bars. (#62114) + Thu Nov 1 19:56:40 2001 Owen Taylor * gtk/gtkmain.c (gtk_main_do_event): ref/unref diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 295e2b7174..4444bffbb1 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Thu Nov 1 20:09:31 2001 Owen Taylor + + * gtk/gtkrange.c: Patch from George Lebl to + fix division by zero for full scroll bars. (#62114) + Thu Nov 1 19:56:40 2001 Owen Taylor * gtk/gtkmain.c (gtk_main_do_event): ref/unref diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 295e2b7174..4444bffbb1 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Thu Nov 1 20:09:31 2001 Owen Taylor + + * gtk/gtkrange.c: Patch from George Lebl to + fix division by zero for full scroll bars. (#62114) + Thu Nov 1 19:56:40 2001 Owen Taylor * gtk/gtkmain.c (gtk_main_do_event): ref/unref diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 295e2b7174..4444bffbb1 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Thu Nov 1 20:09:31 2001 Owen Taylor + + * gtk/gtkrange.c: Patch from George Lebl to + fix division by zero for full scroll bars. (#62114) + Thu Nov 1 19:56:40 2001 Owen Taylor * gtk/gtkmain.c (gtk_main_do_event): ref/unref diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 295e2b7174..4444bffbb1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Thu Nov 1 20:09:31 2001 Owen Taylor + + * gtk/gtkrange.c: Patch from George Lebl to + fix division by zero for full scroll bars. (#62114) + Thu Nov 1 19:56:40 2001 Owen Taylor * gtk/gtkmain.c (gtk_main_do_event): ref/unref diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index 6e63141ea6..a453086ecf 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -1958,8 +1958,9 @@ gtk_range_calc_layout (GtkRange *range, y = top; - y += (bottom - top - height) * ((adjustment_value - range->adjustment->lower) / - (range->adjustment->upper - range->adjustment->lower - range->adjustment->page_size)); + if (range->adjustment->upper - range->adjustment->lower - range->adjustment->page_size != 0) + y += (bottom - top - height) * ((adjustment_value - range->adjustment->lower) / + (range->adjustment->upper - range->adjustment->lower - range->adjustment->page_size)); y = CLAMP (y, top, bottom);