diff -uprN gtk+-cvs-20031119/gtk/gtkscrolledwindow.c gtk+/gtk/gtkscrolledwindow.c
--- gtk+-cvs-20031119/gtk/gtkscrolledwindow.c	2003-11-19 16:53:25.000000000 +0900
+++ gtk+/gtk/gtkscrolledwindow.c	2003-11-19 16:58:34.000000000 +0900
@@ -129,6 +129,9 @@ static void gtk_scrolled_window_relative
 static void gtk_scrolled_window_adjustment_changed (GtkAdjustment          *adjustment,
 						    gpointer                data);
 
+static void gtk_scrolled_window_direction_changed (GtkWidget        *widget, //bidi
+                                                   GtkTextDirection  previous_dir);
+
 static GtkContainerClass *parent_class = NULL;
 
 static guint signals[LAST_SIGNAL] = {0};
@@ -219,6 +222,7 @@ gtk_scrolled_window_class_init (GtkScrol
   widget_class->size_allocate = gtk_scrolled_window_size_allocate;
   widget_class->scroll_event = gtk_scrolled_window_scroll_event;
   widget_class->focus = gtk_scrolled_window_focus;
+  widget_class->direction_changed = gtk_scrolled_window_direction_changed; //bidi
 
   container_class->add = gtk_scrolled_window_add;
   container_class->remove = gtk_scrolled_window_remove;
@@ -339,7 +343,7 @@ gtk_scrolled_window_init (GtkScrolledWin
   scrolled_window->hscrollbar_visible = FALSE;
   scrolled_window->vscrollbar_visible = FALSE;
   scrolled_window->focus_out = FALSE;
-  scrolled_window->window_placement = GTK_CORNER_TOP_LEFT;
+  scrolled_window->window_placement = gtk_widget_get_default_direction() == GTK_TEXT_DIR_RTL? GTK_CORNER_TOP_RIGHT : GTK_CORNER_TOP_LEFT;    //bidi
   
 }
 
@@ -1406,3 +1410,24 @@ _gtk_scrolled_window_get_scrollbar_spaci
       return scrollbar_spacing;
     }
 }
+
+static void                                                       //bidi
+gtk_scrolled_window_direction_changed (GtkWidget        *widget,
+                             GtkTextDirection previous_dir)
+{
+  GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget);
+  GtkCornerType corner_type = gtk_scrolled_window_get_placement(scrolled_window);
+  
+  if (corner_type == GTK_CORNER_TOP_LEFT)
+     corner_type = GTK_CORNER_TOP_RIGHT;
+  else if(corner_type == GTK_CORNER_TOP_RIGHT)
+     corner_type = GTK_CORNER_TOP_LEFT;
+  else if(corner_type == GTK_CORNER_BOTTOM_LEFT)
+     corner_type = GTK_CORNER_BOTTOM_RIGHT;
+  else
+     corner_type = GTK_CORNER_BOTTOM_LEFT;
+  gtk_scrolled_window_set_placement(scrolled_window,corner_type);      
+
+  GTK_WIDGET_CLASS (parent_class)->direction_changed (widget, previous_dir);
+}
+
