diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index b1eed2b..3b69c3e 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1886,7 +1886,10 @@ gtk_scrolled_window_adjustment_changed (GtkAdjustment *adjustment,
 	  priv->hscrollbar_visible = (adjustment->upper - adjustment->lower >
 					      adjustment->page_size);
 	  if (priv->hscrollbar_visible != visible)
-	    gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
+	    {
+	      priv->trust_sb_visibility = TRUE;
+	      gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
+	    }
 	}
     }
   else if (priv->vscrollbar &&
@@ -1900,7 +1903,10 @@ gtk_scrolled_window_adjustment_changed (GtkAdjustment *adjustment,
 	  priv->vscrollbar_visible = (adjustment->upper - adjustment->lower >
 					      adjustment->page_size);
 	  if (priv->vscrollbar_visible != visible)
-	    gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
+	    {
+	      priv->trust_sb_visibility = TRUE;
+	      gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
+	    }
 	}
     }
 }
