diff -uprN gtk+-cvs-20031119/gtk/gtktreeprivate.h gtk+/gtk/gtktreeprivate.h
--- gtk+-cvs-20031119/gtk/gtktreeprivate.h	2003-11-19 16:53:26.000000000 +0900
+++ gtk+/gtk/gtktreeprivate.h	2003-11-20 15:44:18.000000000 +0900
@@ -206,6 +206,8 @@ struct _GtkTreeViewPrivate
   GtkTreeViewSearchEqualFunc search_equal_func;
   gpointer search_user_data;
   GtkDestroyNotify search_destroy;
+  guint init_hadjust_value :1;              //bidi
+  gint prev_width;                          //bidi
 };
 
 /* cool ABI compat hack */
diff -uprN gtk+-cvs-20031119/gtk/gtktreeview.c gtk+/gtk/gtktreeview.c
--- gtk+-cvs-20031119/gtk/gtktreeview.c	2003-11-19 16:53:26.000000000 +0900
+++ gtk+/gtk/gtktreeview.c	2003-11-20 15:44:30.000000000 +0900
@@ -1035,6 +1035,8 @@ gtk_tree_view_init (GtkTreeView *tree_vi
   tree_view->priv->search_column = -1;
   tree_view->priv->search_dialog_position_func = gtk_tree_view_search_position_func;
   tree_view->priv->search_equal_func = gtk_tree_view_search_equal_func;
+  tree_view->priv->init_hadjust_value = TRUE;    //bidi
+  tree_view->priv->width = 0;                    //bidi
 }
 
 
@@ -1536,10 +1538,12 @@ gtk_tree_view_update_size (GtkTreeView *
   if (tree_view->priv->model == NULL)
     {
       tree_view->priv->width = 0;
+      tree_view->priv->prev_width = 0;                   //bidi
       tree_view->priv->height = 0;
       return;
     }
 
+  tree_view->priv->prev_width = tree_view->priv->width;  //bidi
   tree_view->priv->width = 0;
   /* keep this in sync with size_allocate below */
   for (list = tree_view->priv->columns, i = 0; list; list = list->next, i++)
@@ -1840,6 +1844,7 @@ gtk_tree_view_size_allocate (GtkWidget  
   GtkTreeView *tree_view;
   gboolean width_changed = FALSE;
   gboolean dy_changed = FALSE;
+  gint old_width = widget->allocation.width;           //bidi
 
   g_return_if_fail (GTK_IS_TREE_VIEW (widget));
 
@@ -1874,8 +1879,30 @@ gtk_tree_view_size_allocate (GtkWidget  
   tree_view->priv->hadjustment->lower = 0;
   tree_view->priv->hadjustment->upper = MAX (tree_view->priv->hadjustment->page_size, tree_view->priv->width);
 
-  if (tree_view->priv->hadjustment->value + allocation->width > tree_view->priv->width)
-    tree_view->priv->hadjustment->value = MAX (tree_view->priv->width - allocation->width, 0);
+  if (gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL)   //bidi
+     {
+      if (allocation->width < tree_view->priv->width)
+         {
+         if (tree_view->priv->init_hadjust_value)
+           {
+           tree_view->priv->hadjustment->value = MAX (tree_view->priv->width - allocation->width, 0);
+           tree_view->priv->init_hadjust_value = FALSE;
+           }
+         else if(allocation->width != old_width)
+           tree_view->priv->hadjustment->value = CLAMP(tree_view->priv->hadjustment->value - allocation->width + old_width, 0, tree_view->priv->width - allocation->width);
+         else
+           tree_view->priv->hadjustment->value = CLAMP(tree_view->priv->width - (tree_view->priv->prev_width - tree_view->priv->hadjustment->value), 0, tree_view->priv->width - allocation->width);
+         }
+      else
+         {
+         tree_view->priv->hadjustment->value = 0;
+         tree_view->priv->init_hadjust_value = TRUE;
+         }
+     }
+  else
+     if (tree_view->priv->hadjustment->value + allocation->width > tree_view->priv->width)
+        tree_view->priv->hadjustment->value = MAX (tree_view->priv->width - allocation->width, 0);
+
   gtk_adjustment_changed (tree_view->priv->hadjustment);
 
   tree_view->priv->vadjustment->page_size = allocation->height - TREE_VIEW_HEADER_HEIGHT (tree_view);
