[gnumeric] Workaround for gtk scroll bar bug. [#789412]



commit 29a241f5ff8fe96f2552d9e7e78e7174c74c7267
Author: Morten Welinder <terra gnome org>
Date:   Fri Nov 10 18:09:54 2017 -0500

    Workaround for gtk scroll bar bug.  [#789412]
    
    Patch from Jean.  I just added a comment.

 NEWS                    |    1 +
 src/sheet-control-gui.c |   15 +++++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index eb9fc81..77a51c6 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Andreas:
 
 Jean:
        * Fix background of multiple selection. [#789411]
+       * Workaround for gtk scroll bar bug.  [#789412]
 
 Morten:
        * Convert all xpm files to png.
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index fff1753..b98f999 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -472,8 +472,8 @@ scg_resize_virt (SheetControl *sc, gboolean force_scroll)
  * 3) It only uses pane-0 because that is the only one that can scroll in both
  * dimensions.  The others are of fixed size.
  */
-static void
-scg_scrollbar_config (SheetControl const *sc)
+static gboolean
+scg_scrollbar_config_real (SheetControl const *sc)
 {
        SheetControlGUI *scg = GNM_SCG (sc);
        GtkAdjustment *va = scg->va;
@@ -514,6 +514,17 @@ scg_scrollbar_config (SheetControl const *sc)
                         MAX (gtk_adjustment_get_page_size (ha) - 3.0, 1.0),
                         last_col - pane->first.col + 1);
        }
+       return FALSE;
+}
+
+
+static void
+scg_scrollbar_config (SheetControl const *sc)
+{
+       // See bug 789412
+       g_timeout_add (10,
+                      (GSourceFunc) scg_scrollbar_config_real,
+                      (gpointer)sc);
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]