diff -r -u gtk+2.0-2.18.0.orig/gtk/gtkrange.c gtk+2.0-2.18.0/gtk/gtkrange.c --- gtk+2.0-2.18.0.orig/gtk/gtkrange.c 2009-09-29 18:02:13.248054618 +0200 +++ gtk+2.0-2.18.0/gtk/gtkrange.c 2009-09-29 17:59:32.036061612 +0200 @@ -89,6 +89,10 @@ */ GdkRectangle trough; GdkRectangle slider; + /* slider size extended to the trough edge, + * used for mouse event detection to fix Fitts' law problems with trough-border + */ + GdkRectangle sliderMouse; /* Layout-related state */ @@ -2839,7 +2843,7 @@ range->layout->mouse_location = MOUSE_STEPPER_C; else if (POINT_IN_RECT (x, y, range->layout->stepper_d)) range->layout->mouse_location = MOUSE_STEPPER_D; - else if (POINT_IN_RECT (x, y, range->layout->slider)) + else if (POINT_IN_RECT (x, y, range->layout->sliderMouse)) range->layout->mouse_location = MOUSE_SLIDER; else if (POINT_IN_RECT (x, y, range->layout->trough)) range->layout->mouse_location = MOUSE_TROUGH; @@ -3188,7 +3192,9 @@ * and the size/position based on the adjustment or fixed, depending. */ layout->slider.x = layout->trough.x + focus_width + trough_border; + layout->sliderMouse.x = layout->trough.x + focus_width; layout->slider.width = layout->trough.width - (focus_width + trough_border) * 2; + layout->sliderMouse.width = layout->trough.width - (focus_width) * 2; /* Compute slider position/length */ { @@ -3231,7 +3237,9 @@ y = bottom - (y - top + height); layout->slider.y = y; + layout->sliderMouse.y = y; layout->slider.height = height; + layout->sliderMouse.height = height; /* These are publically exported */ range->slider_start = layout->slider.y; @@ -3337,7 +3345,9 @@ * and the size/position based on the adjustment or fixed, depending. */ layout->slider.y = layout->trough.y + focus_width + trough_border; + layout->sliderMouse.y = layout->trough.y + focus_width; layout->slider.height = layout->trough.height - (focus_width + trough_border) * 2; + layout->sliderMouse.height = layout->trough.height - (focus_width) * 2; /* Compute slider position/length */ { @@ -3380,7 +3390,9 @@ x = right - (x - left + width); layout->slider.x = x; + layout->sliderMouse.x = x; layout->slider.width = width; + layout->sliderMouse.width = width; /* These are publically exported */ range->slider_start = layout->slider.x; @@ -3441,7 +3453,7 @@ case MOUSE_TROUGH: return &range->layout->trough; case MOUSE_SLIDER: - return &range->layout->slider; + return &range->layout->sliderMouse; case MOUSE_WIDGET: case MOUSE_OUTSIDE: break;