diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 5023074..c652ff4 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -384,6 +384,7 @@ gtk_private_h_sources =		\
 	gtkplugprivate.h	\
 	gtkprintoperation-private.h\
 	gtkprintutils.h		\
+	gtkrangeprivate.h       \
 	gtkrbtree.h		\
 	gtkrecentchooserdefault.h \
 	gtkrecentchooserprivate.h \
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 82ef2d6..1fcf243 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -3916,5 +3916,33 @@ _gtk_range_get_stop_positions (GtkRange  *range,
   return range->layout->n_marks;
 }
 
+void
+_gtk_range_get_internal_geometry (GtkRange     *range,
+                                  GdkRectangle *trough,
+                                  GdkRectangle *slider,
+                                  GdkRectangle *stepper_a,
+                                  GdkRectangle *stepper_b,
+                                  GdkRectangle *stepper_c,
+                                  GdkRectangle *stepper_d)
+{
+  if (trough)
+    *trough = range->layout->trough;
+
+  if (slider)
+    *slider = range->layout->slider;
+
+  if (stepper_a)
+    *stepper_a = range->layout->stepper_a;
+
+  if (stepper_b)
+    *stepper_b = range->layout->stepper_b;
+
+  if (stepper_c)
+    *stepper_c = range->layout->stepper_c;
+
+  if (stepper_c)
+    *stepper_c = range->layout->stepper_d;
+}
+
 #define __GTK_RANGE_C__
 #include "gtkaliasdef.c"
diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c
index 634b337..3306146 100644
--- a/gtk/gtkscrollbar.c
+++ b/gtk/gtkscrollbar.c
@@ -31,18 +31,188 @@
 #include "gtkintl.h"
 #include "gtkprivate.h"
 #include "gtkalias.h"
+#include "gtkrangeprivate.h"
+#include "gtkorientable.h"
+
+typedef struct _GtkScrollbarPrivate
+{
+  GList    *marks;
+  gboolean  grab_on_slider;
+} GtkScrollbarPrivate;
+
+static void gtk_scrollbar_finalize (GObject *object);
+
+#define GTK_SCROLLBAR_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_SCROLLBAR, GtkScrollbarPrivate))
 
 static void gtk_scrollbar_style_set (GtkWidget *widget,
                                      GtkStyle  *previous);
 
 G_DEFINE_ABSTRACT_TYPE (GtkScrollbar, gtk_scrollbar, GTK_TYPE_RANGE)
 
+void
+paint_slider (GtkWidget    *widget,
+              GdkRectangle *area,
+              GdkRectangle *slider,
+              gint          orientation)
+{
+  gint state, x, y;
+  gboolean touchscreen, hover, shadow_type;
+  GtkScrollbarPrivate *priv = GTK_SCROLLBAR_GET_PRIVATE (GTK_SCROLLBAR (widget));
+
+  gtk_widget_get_pointer (widget, &x, &y);
+  hover = FALSE;
+
+  g_object_get (gtk_widget_get_settings (widget),
+                "gtk-touchscreen-mode", &touchscreen,
+                NULL);  
+  
+  if (x >= slider->x && x <= (slider->x + slider->width) &&
+      y >= slider->y && y <= (slider->y + slider->height))
+    hover = TRUE;
+  
+  if (!gtk_widget_is_sensitive (widget))
+    state = GTK_STATE_INSENSITIVE;
+  else if (!touchscreen && (hover || priv->grab_on_slider))
+    state = GTK_STATE_PRELIGHT;
+  else
+    state = GTK_STATE_NORMAL;
+
+  shadow_type = GTK_SHADOW_OUT;
+
+  if (priv->grab_on_slider)
+  {
+    gboolean activate_slider;
+
+    gtk_widget_style_get (widget, "activate-slider", &activate_slider, NULL);
+
+    if (activate_slider)
+    {
+      state = GTK_STATE_ACTIVE;
+      shadow_type = GTK_SHADOW_IN;
+    }
+  }
+  
+  gtk_paint_slider (widget->style,
+                    widget->window,
+                    state,
+                    shadow_type,
+                    area,
+                    widget,
+                    "slider",
+                    widget->allocation.x + slider->x,
+                    widget->allocation.y + slider->y,
+                    slider->width,
+                    slider->height,
+                    orientation);
+}
+
+static gboolean
+gtk_scrollbar_expose (GtkWidget *widget, GdkEventExpose *event)
+{
+  GList *marks, *next;
+  GtkScrollbar  *scrollbar;
+  GdkRectangle  slider, trough, mark_rect;
+  gint          orientation, state;
+
+  scrollbar = (GtkScrollbar*)widget;
+  marks = GTK_SCROLLBAR_GET_PRIVATE (scrollbar)->marks;
+  orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (widget));
+  
+  GTK_WIDGET_CLASS (gtk_scrollbar_parent_class)->expose_event (widget, event);
+
+  _gtk_range_get_internal_geometry (GTK_RANGE(widget), &trough, &slider,
+                                    NULL, NULL, NULL, NULL);
+
+  if (!gtk_widget_is_sensitive (widget))
+    state = GTK_STATE_INSENSITIVE;
+  else
+    state = GTK_STATE_SELECTED;
+  next = marks;
+  while (next)
+  {
+    gdouble *mark =  (gdouble*)next->data;
+
+    if (orientation == GTK_ORIENTATION_VERTICAL)
+    {
+       mark_rect.x = slider.x;
+       mark_rect.y = trough.y + (trough.height - widget->style->ythickness) * *mark;
+       mark_rect.width = slider.width;
+       mark_rect.height = widget->style->ythickness;
+    }
+    else
+    {
+      mark_rect.x = trough.x + (trough.width - widget->style->xthickness)* *mark;
+      mark_rect.y = slider.y;
+      mark_rect.width = widget->style->xthickness;
+      mark_rect.height = slider.height;
+    }
+    
+    gtk_paint_box (widget->style,
+                   widget->window,
+                   state,
+                   GTK_SHADOW_NONE,
+                   &event->area,
+                   widget,
+                   NULL,
+                   widget->allocation.x + mark_rect.x,
+                   widget->allocation.y + mark_rect.y,
+                   mark_rect.width,
+                   mark_rect.height);
+
+    next = next->next;
+  }
+  
+  
+  paint_slider (widget, &event->area, &slider, orientation);
+  
+  return FALSE;
+}
+
+static gint
+gtk_scrollbar_button_press (GtkWidget *widget, GdkEventButton *event, gpointer data)
+{
+  gint                 x, y;
+  GtkScrollbarPrivate *priv;
+  GdkRectangle         slider;
+  
+  GTK_WIDGET_CLASS (gtk_scrollbar_parent_class)->button_press_event (widget, event);
+  
+  priv = GTK_SCROLLBAR_GET_PRIVATE (GTK_SCROLLBAR (widget));
+  gtk_widget_get_pointer (widget, &x, &y);
+  _gtk_range_get_internal_geometry (GTK_RANGE(widget), NULL, &slider, NULL,
+                                    NULL, NULL, NULL);
+  
+  if (x >= slider.x && x <= (slider.x + slider.width) &&
+      y >= slider.y && y <= (slider.y + slider.height))
+    priv->grab_on_slider = TRUE;
+  
+  return FALSE;
+}
+
+static gint
+gtk_scrollbar_button_release (GtkWidget *widget, GdkEventButton *event, gpointer data)
+{
+  GtkScrollbarPrivate *priv;
+
+  GTK_WIDGET_CLASS (gtk_scrollbar_parent_class)->button_release_event (widget, event);
+  
+  priv = GTK_SCROLLBAR_GET_PRIVATE (GTK_SCROLLBAR (widget));
+  
+  priv->grab_on_slider = FALSE;
+  return FALSE;
+}
+
 static void
 gtk_scrollbar_class_init (GtkScrollbarClass *class)
 {
+  GObjectClass   *gobject_class = G_OBJECT_CLASS (class);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
 
+  widget_class->expose_event = gtk_scrollbar_expose;
   widget_class->style_set = gtk_scrollbar_style_set;
+  widget_class->button_press_event = gtk_scrollbar_button_press;
+  widget_class->button_release_event = gtk_scrollbar_button_release;
+  gobject_class->finalize = gtk_scrollbar_finalize;
 
   GTK_RANGE_CLASS (class)->stepper_detail = "Xscrollbar";
 
@@ -89,11 +259,17 @@ gtk_scrollbar_class_init (GtkScrollbarClass *class)
                                                                  P_("Display a second forward arrow button on the opposite end of the scrollbar"),
                                                                  FALSE,
                                                                  GTK_PARAM_READABLE));
+                                                                 
+                                                                 
+  g_type_class_add_private (gobject_class, sizeof (GtkScrollbarPrivate));
 }
 
 static void
 gtk_scrollbar_init (GtkScrollbar *scrollbar)
 {
+  GtkScrollbarPrivate *priv = GTK_SCROLLBAR_GET_PRIVATE (scrollbar);
+  priv->marks = NULL;
+  priv->grab_on_slider = FALSE;
 }
 
 static void
@@ -151,6 +327,37 @@ gtk_scrollbar_new (GtkOrientation  orientation,
 }
 #endif
 
+static void
+gtk_scrollbar_add_mark (GtkScrollbar *scrollbar, gdouble mark)
+{
+  GtkScrollbarPrivate *priv = GTK_SCROLLBAR_GET_PRIVATE (scrollbar);
+  gdouble *stored_mark = (gdouble*)g_memdup (&mark, sizeof (gdouble));
+  priv->marks = g_list_append (priv->marks, (gpointer)stored_mark);
+}
+
+static void
+gtk_scrollbar_clear_marks (GtkScrollbar *scrollbar)
+{
+  GList *marks, *next;
+  marks = GTK_SCROLLBAR_GET_PRIVATE (scrollbar)->marks;
+  next = marks;
+  
+  while (next)
+  {
+    g_free (next->data);
+    next = next->next;
+  }
+  
+  g_list_free (marks);
+  GTK_SCROLLBAR_GET_PRIVATE (scrollbar)->marks = NULL;
+}
+
+static void
+gtk_scrollbar_finalize (GObject *object)
+{
+  gtk_scrollbar_clear_marks (GTK_SCROLLBAR (object));
+  G_OBJECT_CLASS (gtk_scrollbar_parent_class)->finalize (object);
+}
 
 #define __GTK_SCROLLBAR_C__
 #include "gtkaliasdef.c"
diff --git a/gtk/gtkscrollbar.h b/gtk/gtkscrollbar.h
index 524335d..c4156ee 100644
--- a/gtk/gtkscrollbar.h
+++ b/gtk/gtkscrollbar.h
@@ -67,6 +67,10 @@ struct _GtkScrollbarClass
 
 GType       gtk_scrollbar_get_type (void) G_GNUC_CONST;
 
+static void        gtk_scrollbar_add_mark    (GtkScrollbar *scrollbar, gdouble mark);
+static void        gtk_scrollbar_clear_marks (GtkScrollbar *scrollbar);
+
+
 G_END_DECLS
 
 #endif /* __GTK_SCROLLBAR_H__ */
