[gnome-builder/wip/exalm/terminal-scrolling: 1/6] terminal: Allow to place IdeTerminal into GtkScrolledWindow




commit fb5314c0077f40352507fe3fbae69a257b1a3dae
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sun Sep 26 05:46:52 2021 +0500

    terminal: Allow to place IdeTerminal into GtkScrolledWindow
    
    VteTerminal has 2 flags that need to be flipped for it to be a regular
    GtkScrollable: to make it not try and handle scrolling itself (other than
    with alternate screen), and to use pixels as the scroll unit instead of
    lines. Flip both.

 src/libide/terminal/ide-terminal.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/libide/terminal/ide-terminal.c b/src/libide/terminal/ide-terminal.c
index 6cdd0b147..f1270962b 100644
--- a/src/libide/terminal/ide-terminal.c
+++ b/src/libide/terminal/ide-terminal.c
@@ -609,6 +609,9 @@ ide_terminal_init (IdeTerminal *self)
   style_context_changed (self, style_context);
 
   gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE);
+
+  vte_terminal_set_enable_fallback_scrolling (VTE_TERMINAL (self), FALSE);
+  vte_terminal_set_scroll_unit_is_pixels (VTE_TERMINAL (self), TRUE);
 }
 
 GtkWidget *


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