]> Pileus Git - ~andy/gtk/commitdiff
validate a larger area, proportional to widget size, to fix #71427
authorHavoc Pennington <hp@redhat.com>
Thu, 14 Feb 2002 00:06:13 +0000 (00:06 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Thu, 14 Feb 2002 00:06:13 +0000 (00:06 +0000)
2002-02-13  Havoc Pennington  <hp@redhat.com>

* gtk/gtktextview.c (gtk_text_view_flush_scroll): validate a
larger area, proportional to widget size, to fix
#71427 reported by Dennis Bjorklund

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextview.c

index 91483566a33b6b4a1e2f1fac0b826bff3ca5a5c8..a7783e3c74ea23d58dcab998945bd181a12ff467 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_flush_scroll): validate a
+       larger area, proportional to widget size, to fix
+       #71427 reported by Dennis Bjorklund
+
 2002-02-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_paint): just go ahead and flush 
index 91483566a33b6b4a1e2f1fac0b826bff3ca5a5c8..a7783e3c74ea23d58dcab998945bd181a12ff467 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_flush_scroll): validate a
+       larger area, proportional to widget size, to fix
+       #71427 reported by Dennis Bjorklund
+
 2002-02-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_paint): just go ahead and flush 
index 91483566a33b6b4a1e2f1fac0b826bff3ca5a5c8..a7783e3c74ea23d58dcab998945bd181a12ff467 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_flush_scroll): validate a
+       larger area, proportional to widget size, to fix
+       #71427 reported by Dennis Bjorklund
+
 2002-02-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_paint): just go ahead and flush 
index 91483566a33b6b4a1e2f1fac0b826bff3ca5a5c8..a7783e3c74ea23d58dcab998945bd181a12ff467 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_flush_scroll): validate a
+       larger area, proportional to widget size, to fix
+       #71427 reported by Dennis Bjorklund
+
 2002-02-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_paint): just go ahead and flush 
index 91483566a33b6b4a1e2f1fac0b826bff3ca5a5c8..a7783e3c74ea23d58dcab998945bd181a12ff467 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_flush_scroll): validate a
+       larger area, proportional to widget size, to fix
+       #71427 reported by Dennis Bjorklund
+
 2002-02-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_paint): just go ahead and flush 
index 91483566a33b6b4a1e2f1fac0b826bff3ca5a5c8..a7783e3c74ea23d58dcab998945bd181a12ff467 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_flush_scroll): validate a
+       larger area, proportional to widget size, to fix
+       #71427 reported by Dennis Bjorklund
+
 2002-02-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_paint): just go ahead and flush 
index 91483566a33b6b4a1e2f1fac0b826bff3ca5a5c8..a7783e3c74ea23d58dcab998945bd181a12ff467 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-13  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_flush_scroll): validate a
+       larger area, proportional to widget size, to fix
+       #71427 reported by Dennis Bjorklund
+
 2002-02-13  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_paint): just go ahead and flush 
index 77b99bbe6aab1ca35f42655d1956cdf48e28ec74..1ed23146a4e4f8da319fc9e526905cb484ec7c3d 100644 (file)
@@ -1545,6 +1545,9 @@ gtk_text_view_flush_scroll (GtkTextView *text_view)
   GtkTextIter iter;
   GtkTextPendingScroll *scroll;
   gboolean retval;
+  GtkWidget *widget;
+
+  widget = GTK_WIDGET (text_view);
   
   DV(g_print(G_STRLOC"\n"));
   
@@ -1561,11 +1564,17 @@ gtk_text_view_flush_scroll (GtkTextView *text_view)
   
   gtk_text_buffer_get_iter_at_mark (get_buffer (text_view), &iter, scroll->mark);
 
-  /* Validate arbitrary area around the scroll destination, so the adjustment
-   * can meaningfully point into that area
+  /* Validate area around the scroll destination, so the adjustment
+   * can meaningfully point into that area. We must validate
+   * enough area to be sure that after we scroll, everything onscreen
+   * is valid; otherwise, validation will maintain the first para
+   * in one place, but may push the target iter off the bottom of
+   * the screen.
    */
   DV(g_print (">Validating scroll destination ("G_STRLOC")\n"));
-  gtk_text_layout_validate_yrange (text_view->layout, &iter, -300, 300);
+  gtk_text_layout_validate_yrange (text_view->layout, &iter,
+                                   - (widget->allocation.height * 2),
+                                   widget->allocation.height * 2);
   
   DV(g_print (">Done validating scroll destination ("G_STRLOC")\n"));
 
@@ -5900,7 +5909,7 @@ gtk_text_view_value_changed (GtkAdjustment *adj,
   /* process exposes */
   if (GTK_WIDGET_REALIZED (text_view))
     {
-      DV (g_print ("Processing updates (%s)", G_STRLOC));
+      DV (g_print ("Processing updates (%s)\n", G_STRLOC));
       
       if (text_view->left_window)
         gdk_window_process_updates (text_view->left_window->bin_window, TRUE);