--- gtk+-2.6.10/gtk/gtkrange.c	2005-04-07 06:45:30.000000000 +0200
+++ gtk+maemo/gtk/gtkrange.c	2005-10-17 11:16:38.000000000 +0200
@@ -136,6 +155,8 @@ static void update_slider_position   (Gt
                                       gint              mouse_y);
 static void stop_scrolling           (GtkRange         *range);
 
+static gint osso_gtk_range_focus_out (GtkWidget *widget, GdkEventFocus *event);
+
 /* Range methods */
 
 static void gtk_range_move_slider              (GtkRange         *range,
@@ -247,6 +268,9 @@ gtk_range_class_init (GtkRangeClass *cla
   widget_class->state_changed = gtk_range_state_changed;
   widget_class->style_set = gtk_range_style_set;
 
+  /* OSSO addition (see bug #1653) */
+  widget_class->focus_out_event = osso_gtk_range_focus_out;
+
   class->move_slider = gtk_range_move_slider;
   class->change_value = gtk_range_real_change_value;
 
@@ -2548,5 +2925,118 @@ gtk_range_remove_update_timer (GtkRange 
     }
 }
 
+/* OSSO addition : A function to ensure that
+ * scrolling stops if widget loses focus (example:
+ * dialog pops up) */
+static gint
+osso_gtk_range_focus_out (GtkWidget *widget, GdkEventFocus *event)
+{
+  gboolean hildonlike;
+
+  gtk_widget_style_get (widget, "hildonlike", &hildonlike, NULL);
+   
+  if (hildonlike)
+    {
+      stop_scrolling (GTK_RANGE (widget));
+    }
+  return GTK_WIDGET_CLASS (parent_class)->focus_out_event (widget, event);
+}
+
 #define __GTK_RANGE_C__
 #include "gtkaliasdef.c"
