[gnome-builder/wip/exalm/terminal-scrolling: 2/7] terminal: Allow to place IdeTerminal into GtkScrolledWindow
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/exalm/terminal-scrolling: 2/7] terminal: Allow to place IdeTerminal into GtkScrolledWindow
- Date: Mon, 27 Sep 2021 08:55:34 +0000 (UTC)
commit a63c5092748f9d020289daffce430f262aca0c9b
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.
Bump vte to 0.65.90 as these are new.
meson.build | 2 +-
src/libide/terminal/ide-terminal.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index f9d2b1bbe..15d0fda10 100644
--- a/meson.build
+++ b/meson.build
@@ -286,7 +286,7 @@ libpangoft2_dep = dependency('pangoft2', version: '>= 1.38.0')
libpeas_dep = dependency('libpeas-1.0', version: '>= 1.22.0')
libportal_dep = dependency('libportal', version: '>= 0.3', required: false)
libtemplate_glib_dep = dependency('template-glib-1.0', version: '>= 3.28.0')
-libvte_dep = dependency('vte-2.91', version: '>= 0.40.2')
+libvte_dep = dependency('vte-2.91', version: '>= 0.65.0')
libwebkit_dep = dependency('webkit2gtk-4.0', version: '>= 2.26', required: false)
libxml2_dep = dependency('libxml-2.0', version: '>= 2.9.0')
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]