[tepl] Tab: disable overlay scrolling



commit b092add759b3e8475093163dc1f4bceb096c210d
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jun 23 19:44:39 2017 +0200

    Tab: disable overlay scrolling

 tepl/tepl-tab.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/tepl/tepl-tab.c b/tepl/tepl-tab.c
index d73ab51..662dcc9 100644
--- a/tepl/tepl-tab.c
+++ b/tepl/tepl-tab.c
@@ -61,16 +61,23 @@ G_DEFINE_TYPE_WITH_PRIVATE (TeplTab, tepl_tab, GTK_TYPE_GRID)
 static GtkScrolledWindow *
 create_scrolled_window (void)
 {
-       GtkWidget *scrolled_window;
+       GtkScrolledWindow *scrolled_window;
+
+       scrolled_window = GTK_SCROLLED_WINDOW (gtk_scrolled_window_new (NULL, NULL));
 
-       scrolled_window = gtk_scrolled_window_new (NULL, NULL);
-       gtk_widget_show (scrolled_window);
+       /* Disable overlay scrolling, it doesn't work well with GtkTextView. For
+        * example to place the cursor with the mouse on the last character of a
+        * line.
+        */
+       gtk_scrolled_window_set_overlay_scrolling (scrolled_window, FALSE);
 
        g_object_set (scrolled_window,
                      "expand", TRUE,
                      NULL);
 
-       return GTK_SCROLLED_WINDOW (scrolled_window);
+       gtk_widget_show (GTK_WIDGET (scrolled_window));
+
+       return scrolled_window;
 }
 
 static void


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