From 7855b397b093cac06224cf728ca3962faebfe9c8 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 3 Nov 2020 08:31:12 -0700 Subject: [PATCH 001/102] Fix bogus volatile caught by gcc-11 --- vte291-gcc11.patch | 13 +++++++++++++ vte291.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 vte291-gcc11.patch diff --git a/vte291-gcc11.patch b/vte291-gcc11.patch new file mode 100644 index 0000000..971b56c --- /dev/null +++ b/vte291-gcc11.patch @@ -0,0 +1,13 @@ +diff --git a/src/vtetypebuiltins.cc.template b/src/vtetypebuiltins.cc.template +index dade41d..4c8b5c4 100644 +--- a/src/vtetypebuiltins.cc.template ++++ b/src/vtetypebuiltins.cc.template +@@ -11,7 +11,7 @@ + GType + @enum_name@_get_type (void) + { +- static volatile gsize g_define_type_id__volatile = 0; ++ static gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) { + static const G@Type@Value values[] = { diff --git a/vte291.spec b/vte291.spec index 36f6971..db1ca95 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.62.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Terminal emulator library License: LGPLv2+ @@ -21,6 +21,7 @@ Source0: http://download.gnome.org/sources/vte/0.62/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 Patch100: vte291-cntnr-precmd-preexec-scroll.patch +Patch101: %{name}-gcc11.patch BuildRequires: gcc-c++ BuildRequires: gettext @@ -83,6 +84,7 @@ emulator library. %prep %setup -q -n vte-%{version} %patch100 -p1 -b .cntnr-precmd-preexec-scroll +%patch101 -p1 -b .gcc11 %if 0%{?flatpak} # Install user units where systemd macros expect them sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build @@ -118,6 +120,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Tue Nov 03 2020 Jeff Law - 0.62.1-2 +- Fix bogus volatile caught by gcc-11 + * Thu Oct 08 2020 Debarshi Ray - 0.62.1-1 - Update to 0.62.1 - Rebase downstream patches From de2838742197f182c406b37f031e58dac12ebad4 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 16 Dec 2020 21:03:30 +0100 Subject: [PATCH 002/102] Accommodate 'sudo toolbox' when tracking the active container --- vte291-cntnr-precmd-preexec-scroll.patch | 204 +++++++++++++++-------- vte291.spec | 5 +- 2 files changed, 143 insertions(+), 66 deletions(-) diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index 59ad6b5..e86ce01 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,4 +1,4 @@ -From 0728f06f528c1ba77a8671c529e44fbabd9c8980 Mon Sep 17 00:00:00 2001 +From 8d4a539a20142a3944e12f029ded76a27749296c Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 01/10] Add sequences and signals for desktop notification @@ -36,10 +36,10 @@ index 241128c3ccfe..4412cf3d5f5c 100644 VOID:STRING,UINT VOID:UINT,UINT diff --git a/src/vte.cc b/src/vte.cc -index c33b27c45023..01c7dd7eebc4 100644 +index 2614e5b4d20f..ac54d8791ba2 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10135,6 +10135,15 @@ Terminal::emit_pending_signals() +@@ -10143,6 +10143,15 @@ Terminal::emit_pending_signals() emit_adjustment_changed(); @@ -72,7 +72,7 @@ index d5e96535a867..71c4c66cc4ee 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index f7a65f72b68e..30e0af0f8015 100644 +index 41de14ba1019..09a18439277f 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -934,6 +934,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -206,10 +206,10 @@ index ba9a2df6b9c4..c765b0bfb1f4 100644 default: break; -- -2.25.4 +2.29.2 -From 4c3bce7d70e208bee0f36d64a540ade9975c3ce7 Mon Sep 17 00:00:00 2001 +From e75a6e2b9b4a1789ab7c2c1572e13c38dc73daf5 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 Subject: [PATCH 02/10] vte.sh: Emit OSC 777 from PROMPT_COMMAND @@ -242,10 +242,10 @@ index a12e254b6cba..f7c4fdeff30b 100644 } -- -2.25.4 +2.29.2 -From 5171a84e95ad20048dcb1683c149711430002149 Mon Sep 17 00:00:00 2001 +From d726c0779babba159dc01a1dd20c0a6678dbd4dc Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 Subject: [PATCH 03/10] Test the notification-received signal @@ -281,10 +281,10 @@ index fc26c2b0dfc3..634b8ddeeb91 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index d8bfe9e13826..e95f58cd3bac 100644 +index 6453ef8516f9..65521e1f4177 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1851,6 +1851,14 @@ window_window_title_changed_cb(VteTerminal* terminal, +@@ -1862,6 +1862,14 @@ window_window_title_changed_cb(VteTerminal* terminal, vte_terminal_get_window_title(window->terminal)); } @@ -299,7 +299,7 @@ index d8bfe9e13826..e95f58cd3bac 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2086,6 +2094,8 @@ vteapp_window_constructed(GObject *object) +@@ -2097,6 +2105,8 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); @@ -309,10 +309,10 @@ index d8bfe9e13826..e95f58cd3bac 100644 if (options.no_double_buffer) { G_GNUC_BEGIN_IGNORE_DEPRECATIONS; -- -2.25.4 +2.29.2 -From ed262358646832779ee0eb5afa0a8a7a6c1c2adf Mon Sep 17 00:00:00 2001 +From f3ec33fc7a644aa9a8d640af16e8ef87a7db5db7 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 Subject: [PATCH 04/10] Add a property to configure the scroll speed @@ -343,10 +343,10 @@ index c222e7fdff0b..6da5eff30715 100644 vte_terminal_get_scrollback_lines vte_terminal_set_font diff --git a/src/vte.cc b/src/vte.cc -index 01c7dd7eebc4..af73288b9f20 100644 +index ac54d8791ba2..68fc4bf8f448 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -9334,6 +9334,7 @@ vte_cairo_get_clip_region (cairo_t *cr) +@@ -9342,6 +9342,7 @@ vte_cairo_get_clip_region (cairo_t *cr) bool Terminal::widget_mouse_scroll(MouseEvent const& event) { @@ -354,7 +354,7 @@ index 01c7dd7eebc4..af73288b9f20 100644 gdouble v; gint cnt, i; int button; -@@ -9390,7 +9391,13 @@ Terminal::widget_mouse_scroll(MouseEvent const& event) +@@ -9398,7 +9399,13 @@ Terminal::widget_mouse_scroll(MouseEvent const& event) return true; } @@ -369,7 +369,7 @@ index 01c7dd7eebc4..af73288b9f20 100644 _vte_debug_print(VTE_DEBUG_EVENTS, "Scroll speed is %d lines per non-smooth scroll unit\n", (int) v); -@@ -9693,6 +9700,16 @@ Terminal::decscusr_cursor_shape() const noexcept +@@ -9701,6 +9708,16 @@ Terminal::decscusr_cursor_shape() const noexcept } } @@ -402,7 +402,7 @@ index 71c4c66cc4ee..203c77e08c57 100644 _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 30e0af0f8015..bf88b9481981 100644 +index 09a18439277f..934e0ab2bd37 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -712,6 +712,9 @@ try @@ -447,7 +447,7 @@ index 30e0af0f8015..bf88b9481981 100644 /** * VteTerminal:scrollback-lines: * -@@ -5324,6 +5345,30 @@ catch (...) +@@ -5323,6 +5344,30 @@ catch (...) return -1; } @@ -511,10 +511,10 @@ index 7608eecc38d9..79ea9e7f0da0 100644 bool set_scroll_on_keystroke(bool scroll); bool set_scroll_on_output(bool scroll); -- -2.25.4 +2.29.2 -From 73e7009c342747fbb3bdbef322811e09467dab9b Mon Sep 17 00:00:00 2001 +From 9538e23477d7e99909961f7ea5868f9c19c043e1 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 Subject: [PATCH 05/10] Test the scroll-speed property @@ -555,7 +555,7 @@ index 634b8ddeeb91..c984b868246d 100644 "Specify the number of scrollback-lines", null }, { "transparent", 'T', 0, OptionArg.INT, ref transparency_percent, diff --git a/src/app/app.cc b/src/app/app.cc -index e95f58cd3bac..52893c87414a 100644 +index 65521e1f4177..28e934d9d9c0 100644 --- a/src/app/app.cc +++ b/src/app/app.cc @@ -108,6 +108,7 @@ public: @@ -566,7 +566,7 @@ index e95f58cd3bac..52893c87414a 100644 VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM}; VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK}; VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS}; -@@ -569,6 +570,8 @@ public: +@@ -580,6 +581,8 @@ public: "Reverse foreground/background colors", nullptr }, { "require-systemd-scope", 0, 0, G_OPTION_ARG_NONE, &require_systemd_scope, "Require use of a systemd user scope", nullptr }, @@ -575,7 +575,7 @@ index e95f58cd3bac..52893c87414a 100644 { "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines, "Specify the number of scrollback-lines (-1 for infinite)", nullptr }, { "transparent", 'T', 0, G_OPTION_ARG_INT, &transparency_percent, -@@ -2127,6 +2130,7 @@ vteapp_window_constructed(GObject *object) +@@ -2138,6 +2141,7 @@ vteapp_window_constructed(GObject *object) vte_terminal_set_rewrap_on_resize(window->terminal, !options.no_rewrap); vte_terminal_set_scroll_on_output(window->terminal, false); vte_terminal_set_scroll_on_keystroke(window->terminal, true); @@ -584,10 +584,10 @@ index e95f58cd3bac..52893c87414a 100644 vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); -- -2.25.4 +2.29.2 -From 2fe27cbe7cbb120e9055284c9e7e34423e5add49 Mon Sep 17 00:00:00 2001 +From 8e616fea1e377e03d5f3cbac0786df5e76da896d Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 06/10] Support preexec notifications from an interactive shell @@ -616,10 +616,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index af73288b9f20..d77d27967b50 100644 +index 68fc4bf8f448..09068deebdf2 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10161,6 +10161,13 @@ Terminal::emit_pending_signals() +@@ -10169,6 +10169,13 @@ Terminal::emit_pending_signals() m_notification_received = false; } @@ -663,7 +663,7 @@ index 203c77e08c57..5668ac7d71df 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index bf88b9481981..df247f27c038 100644 +index 934e0ab2bd37..0bba24ee534f 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -941,6 +941,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -739,10 +739,10 @@ index c765b0bfb1f4..ad5935063bd9 100644 bool -- -2.25.4 +2.29.2 -From 62b4dec7a7493f531de60ee814596176f3b9c082 Mon Sep 17 00:00:00 2001 +From c7c410786da41bf9bbcdf8ca1be21dcf0d89637d Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 Subject: [PATCH 07/10] Test the shell-preexec signal @@ -779,10 +779,10 @@ index c984b868246d..83af686be106 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index 52893c87414a..3ef597e97365 100644 +index 28e934d9d9c0..c9f7b5637d16 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1862,6 +1862,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -1873,6 +1873,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -795,7 +795,7 @@ index 52893c87414a..3ef597e97365 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2098,6 +2104,7 @@ vteapp_window_constructed(GObject *object) +@@ -2109,6 +2115,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -804,10 +804,10 @@ index 52893c87414a..3ef597e97365 100644 /* Settings */ if (options.no_double_buffer) { -- -2.25.4 +2.29.2 -From ce908501de9d32ab9d3e0cc600058e104bec2130 Mon Sep 17 00:00:00 2001 +From 034f0a8ae047af6d6a2ee9c443b6686a4eff3018 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 08/10] Support precmd notifications from an interactive shell @@ -836,10 +836,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index d77d27967b50..54654c8589ab 100644 +index 09068deebdf2..6d3d3c5a2854 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10168,6 +10168,13 @@ Terminal::emit_pending_signals() +@@ -10176,6 +10176,13 @@ Terminal::emit_pending_signals() m_shell_preexec = FALSE; } @@ -884,7 +884,7 @@ index 5668ac7d71df..cbd2a77f9f29 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index df247f27c038..afccd6d85c65 100644 +index 0bba24ee534f..4e0bc3a68464 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -941,6 +941,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -959,10 +959,10 @@ index ad5935063bd9..4b66681d713c 100644 } } -- -2.25.4 +2.29.2 -From c57e30715838cb9d6eb0d4390867746bea0c42d5 Mon Sep 17 00:00:00 2001 +From 6083ed32c023a7a24f4b4856147a0970d59f9a35 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 09/10] Test the shell-precmd signal @@ -999,10 +999,10 @@ index 83af686be106..300384f5c74b 100644 { print("[shell] executing command\n"); diff --git a/src/app/app.cc b/src/app/app.cc -index 3ef597e97365..e1b10ca43b2c 100644 +index c9f7b5637d16..b679bc0bff50 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1862,6 +1862,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -1873,6 +1873,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -1015,7 +1015,7 @@ index 3ef597e97365..e1b10ca43b2c 100644 static void shell_preexec_cb(VteTerminal *terminal) { -@@ -2104,6 +2110,7 @@ vteapp_window_constructed(GObject *object) +@@ -2115,6 +2121,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -1024,16 +1024,22 @@ index 3ef597e97365..e1b10ca43b2c 100644 /* Settings */ -- -2.25.4 +2.29.2 -From 3e049907ff0981ba235df9b97b56828cb814fb76 Mon Sep 17 00:00:00 2001 +From b0a81273d4ff929afa4e37750273980e70017c77 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 10/10] Support tracking the active container inside the terminal Add sequences + + OSC 777 ; container ; push ; NAME ; RUNTIME ; UID BEL + OSC 777 ; container ; push ; NAME ; RUNTIME ; UID ST + OSC 777 ; container ; pop ; NAME ; RUNTIME ; UID BEL + OSC 777 ; container ; pop ; NAME ; RUNTIME ; UID ST + OSC 777 ; container ; push ; NAME ; RUNTIME BEL OSC 777 ; container ; push ; NAME ; RUNTIME ST OSC 777 ; container ; pop ; NAME ; RUNTIME BEL @@ -1042,7 +1048,9 @@ Add sequences that let container tools notify the terminal emulator when entering and leaving a container environment. The RUNTIME argument namespaces the NAME and identifies the container tooling being used. eg., docker, -flatpak, podman, toolbox, etc.. +flatpak, podman, toolbox, etc.. The UID argument is the real UID of the +container tools. Only those containers that are used with the same real +UID as the VTE process are tracked. The OSC 777 escape sequence is taken from Enlightenment's Terminology: https://phab.enlightenment.org/T1765 @@ -1053,18 +1061,18 @@ agreed upon across multiple different terminal emulators [1]. [1] https://gitlab.freedesktop.org/terminal-wg/specifications/issues/17 --- src/vte.cc | 9 +++++ - src/vte/vteterminal.h | 4 +++ - src/vtegtk.cc | 77 +++++++++++++++++++++++++++++++++++++++++++ - src/vtegtk.hh | 2 ++ - src/vteinternal.hh | 16 +++++++++ - src/vteseq.cc | 31 +++++++++++++++++ - 6 files changed, 139 insertions(+) + src/vte/vteterminal.h | 4 ++ + src/vtegtk.cc | 77 ++++++++++++++++++++++++++++++++++++++ + src/vtegtk.hh | 2 + + src/vteinternal.hh | 16 ++++++++ + src/vteseq.cc | 86 +++++++++++++++++++++++++++++++++++++++++++ + 6 files changed, 194 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index 54654c8589ab..b5f1258bbd99 100644 +index 6d3d3c5a2854..74db14f593dd 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10189,6 +10189,15 @@ Terminal::emit_pending_signals() +@@ -10197,6 +10197,15 @@ Terminal::emit_pending_signals() m_window_title_changed = false; } @@ -1096,7 +1104,7 @@ index cbd2a77f9f29..15aa421a0c68 100644 _VTE_PUBLIC const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index afccd6d85c65..242d6d979ddc 100644 +index 4e0bc3a68464..2e6859798c42 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -664,6 +664,12 @@ try @@ -1140,7 +1148,7 @@ index afccd6d85c65..242d6d979ddc 100644 /** * VteTerminal:current-directory-uri: * -@@ -4531,6 +4558,56 @@ catch (...) +@@ -4530,6 +4557,56 @@ catch (...) return -1; } @@ -1252,10 +1260,25 @@ index 18ffeaf3a270..f6b98f670ad5 100644 bool m_notification_received{false}; std::string m_notification_summary; diff --git a/src/vteseq.cc b/src/vteseq.cc -index 4b66681d713c..6e7cb8741696 100644 +index 4b66681d713c..4240896b95e8 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1385,6 +1385,37 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -20,10 +20,14 @@ + + #include "config.h" + ++#include ++ + #include + #include + #include + #include ++#include ++#include + #ifdef HAVE_SYS_SYSLIMITS_H + #include + #endif +@@ -1385,6 +1389,88 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, if (token == endtoken) return; @@ -1269,10 +1292,41 @@ index 4b66681d713c..6e7cb8741696 100644 + ++token; + + if (sub_command == "pop") { -+ if (!m_containers.empty()) { -+ m_containers.pop(); -+ m_containers_changed = true; ++ if (token == endtoken) ++ return; ++ ++ ++token; ++ ++ if (token == endtoken) ++ return; ++ ++ ++token; ++ ++ if (token == endtoken) { ++ if (!m_containers.empty()) { ++ m_containers.pop(); ++ m_containers_changed = true; ++ } ++ ++ return; + } ++ ++ const std::string uid_token = *token; ++ ++token; ++ ++ const uid_t uid = getuid(); ++ const std::string uid_str = std::to_string(uid); ++ ++ if (uid_token == uid_str) { ++ if (!m_containers.empty()) { ++ m_containers.pop(); ++ m_containers_changed = true; ++ } ++ ++ return; ++ } ++ ++ return; + } else if (sub_command == "push") { + if (token == endtoken) + return; @@ -1284,15 +1338,35 @@ index 4b66681d713c..6e7cb8741696 100644 + return; + + const std::string runtime = *token; ++ ++token; + -+ m_containers.emplace(name, runtime); -+ m_containers_changed = true; ++ if (token == endtoken) { ++ m_containers.emplace(name, runtime); ++ m_containers_changed = true; ++ return; ++ } ++ ++ const std::string uid_token = *token; ++ ++token; ++ ++ const uid_t uid = getuid(); ++ const std::string uid_str = std::to_string(uid); ++ ++ if (uid_token == uid_str) { ++ m_containers.emplace(name, runtime); ++ m_containers_changed = true; ++ return; ++ } ++ ++ return; + } ++ ++ return; + } + if (*token == "notify") { ++token; -- -2.25.4 +2.29.2 diff --git a/vte291.spec b/vte291.spec index db1ca95..3fb5470 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.62.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Terminal emulator library License: LGPLv2+ @@ -120,6 +120,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Dec 16 2020 Debarshi Ray - 0.62.1-3 +- Accommodate 'sudo toolbox' when tracking the active container + * Tue Nov 03 2020 Jeff Law - 0.62.1-2 - Fix bogus volatile caught by gcc-11 From 7fcaeb25788b130fa53baa6e9153433c5f3a9b53 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 25 Jan 2021 12:10:00 +0100 Subject: [PATCH 003/102] Update to 0.62.2 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2601051..d6e33d3 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ /vte-0.61.91.tar.xz /vte-0.62.0.tar.xz /vte-0.62.1.tar.xz +/vte-0.62.2.tar.xz diff --git a/sources b/sources index 226c877..49747a1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.62.1.tar.xz) = 2f8f76953e0ea6c604357ab08630d3822a252051d8997cf7714553fec1688735468726bfd74e03f122dd1c8d0717e511ec7ec1e5463a086bd407afc6f7df91cf +SHA512 (vte-0.62.2.tar.xz) = 61ea130d43d60531dcaa8bddfecacfd4a934a2e868da69b598fad0a2feb04885fc0b5dd520dac4b0d3a4daf11ea70c5357066ed15759e36436346dae498e8ef8 diff --git a/vte291.spec b/vte291.spec index 3fb5470..8847a15 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,8 +10,8 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.62.1 -Release: 3%{?dist} +Version: 0.62.2 +Release: 1%{?dist} Summary: Terminal emulator library License: LGPLv2+ @@ -120,6 +120,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Jan 25 2021 Kalev Lember - 0.62.2-1 +- Update to 0.62.2 + * Wed Dec 16 2020 Debarshi Ray - 0.62.1-3 - Accommodate 'sudo toolbox' when tracking the active container From c3105257066c621533027a54b64a09eccde50700 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 23:16:06 +0000 Subject: [PATCH 004/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 8847a15..77f8390 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.62.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Terminal emulator library License: LGPLv2+ @@ -120,6 +120,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 0.62.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Jan 25 2021 Kalev Lember - 0.62.2-1 - Update to 0.62.2 From 3c500b1b233384892990e78d38504d40956f3821 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:43:23 +0100 Subject: [PATCH 005/102] Update to 0.62.3 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d6e33d3..883639b 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,4 @@ /vte-0.62.0.tar.xz /vte-0.62.1.tar.xz /vte-0.62.2.tar.xz +/vte-0.62.3.tar.xz diff --git a/sources b/sources index 49747a1..04c5626 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.62.2.tar.xz) = 61ea130d43d60531dcaa8bddfecacfd4a934a2e868da69b598fad0a2feb04885fc0b5dd520dac4b0d3a4daf11ea70c5357066ed15759e36436346dae498e8ef8 +SHA512 (vte-0.62.3.tar.xz) = 0475e2813b305bf1b5d48ece5959f2feb10e89b589fa3b75032ae466fd5254bf5c2fc6085dc296d65c5df84790a38892534ff401109843bf964ae62a8c540a81 diff --git a/vte291.spec b/vte291.spec index 77f8390..c510d87 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,8 +10,8 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.62.2 -Release: 2%{?dist} +Version: 0.62.3 +Release: 1%{?dist} Summary: Terminal emulator library License: LGPLv2+ @@ -120,6 +120,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Tue Feb 16 2021 Kalev Lember - 0.62.3-1 +- Update to 0.62.3 + * Wed Jan 27 2021 Fedora Release Engineering - 0.62.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From e11b47498f58b2797c0f30af57c0a55416872979 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:43:55 +0100 Subject: [PATCH 006/102] Use https URLs for upstream ... and point to vte wiki page instead of generic gnome.org. --- vte291.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vte291.spec b/vte291.spec index c510d87..a309152 100644 --- a/vte291.spec +++ b/vte291.spec @@ -15,8 +15,8 @@ Release: 1%{?dist} Summary: Terminal emulator library License: LGPLv2+ -URL: http://www.gnome.org/ -Source0: http://download.gnome.org/sources/vte/0.62/vte-%{version}.tar.xz +URL: https://wiki.gnome.org/Apps/Terminal/VTE +Source0: https://download.gnome.org/sources/vte/0.62/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -122,6 +122,7 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %changelog * Tue Feb 16 2021 Kalev Lember - 0.62.3-1 - Update to 0.62.3 +- Use https URLs for upstream * Wed Jan 27 2021 Fedora Release Engineering - 0.62.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 46864f7651614e151046c22b3cc98c53a76a54e5 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:46:41 +0100 Subject: [PATCH 007/102] Revert a change that limited select all, as decided by Workstation WG See https://pagure.io/fedora-workstation/issue/216 for details. --- ...mit-select-all-to-the-writable-regio.patch | 45 +++++++++++++++++++ vte291.spec | 4 ++ 2 files changed, 49 insertions(+) create mode 100644 0001-Revert-widget-Limit-select-all-to-the-writable-regio.patch diff --git a/0001-Revert-widget-Limit-select-all-to-the-writable-regio.patch b/0001-Revert-widget-Limit-select-all-to-the-writable-regio.patch new file mode 100644 index 0000000..40d84d6 --- /dev/null +++ b/0001-Revert-widget-Limit-select-all-to-the-writable-regio.patch @@ -0,0 +1,45 @@ +From 713732012fa06c26ce320cce732fe5bb56936b6c Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 16 Feb 2021 16:30:44 +0100 +Subject: [PATCH] Revert "widget: Limit select-all to the writable region not + including the scrollback" + +... as decided by Fedora Workstation WG. + +https://pagure.io/fedora-workstation/issue/216 + +This reverts commit 73713ec0644e232fb740170e399282be778d97f9. +--- + src/vte.cc | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/vte.cc b/src/vte.cc +index 5a631d96..88f053ef 100644 +--- a/src/vte.cc ++++ b/src/vte.cc +@@ -6719,10 +6719,7 @@ Terminal::maybe_end_selection() + /* + * Terminal::select_all: + * +- * Selects all text within the terminal. Note that we only select the writable +- * region, *not* the scrollback buffer, due to this potentially selecting so +- * much data that putting it on the clipboard either hangs the process for a long +- * time or even crash it directly. (FIXME!) ++ * Selects all text within the terminal (including the scrollback buffer). + */ + void + Terminal::select_all() +@@ -6731,8 +6728,8 @@ Terminal::select_all() + + m_selecting_had_delta = TRUE; + +- m_selection_resolved.set({m_screen->insert_delta, 0}, +- {_vte_ring_next(m_screen->row_data), 0}); ++ m_selection_resolved.set ({ _vte_ring_delta (m_screen->row_data), 0 }, ++ { _vte_ring_next (m_screen->row_data), 0 }); + + _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); + +-- +2.29.2 + diff --git a/vte291.spec b/vte291.spec index a309152..426f127 100644 --- a/vte291.spec +++ b/vte291.spec @@ -18,6 +18,9 @@ License: LGPLv2+ URL: https://wiki.gnome.org/Apps/Terminal/VTE Source0: https://download.gnome.org/sources/vte/0.62/vte-%{version}.tar.xz +# https://pagure.io/fedora-workstation/issue/216 +Patch0: 0001-Revert-widget-Limit-select-all-to-the-writable-regio.patch + # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 Patch100: vte291-cntnr-precmd-preexec-scroll.patch @@ -123,6 +126,7 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build * Tue Feb 16 2021 Kalev Lember - 0.62.3-1 - Update to 0.62.3 - Use https URLs for upstream +- Revert a change that limited select all, as decided by Workstation WG * Wed Jan 27 2021 Fedora Release Engineering - 0.62.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 03ce959c3bbba97cd9a0c50fa0d6037d695eaf74 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 18 Feb 2021 16:24:37 +0100 Subject: [PATCH 008/102] Actually apply the patch --- vte291.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vte291.spec b/vte291.spec index 426f127..9aacd57 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.62.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Terminal emulator library License: LGPLv2+ @@ -86,6 +86,7 @@ emulator library. %prep %setup -q -n vte-%{version} +%patch0 -p1 -b .revert-select-all %patch100 -p1 -b .cntnr-precmd-preexec-scroll %patch101 -p1 -b .gcc11 %if 0%{?flatpak} @@ -123,10 +124,12 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Thu Feb 18 2021 Kalev Lember - 0.62.3-2 +- Revert a change that limited select all, as decided by Workstation WG + * Tue Feb 16 2021 Kalev Lember - 0.62.3-1 - Update to 0.62.3 - Use https URLs for upstream -- Revert a change that limited select all, as decided by Workstation WG * Wed Jan 27 2021 Fedora Release Engineering - 0.62.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 2fdd15b92764975589dc492af90827ebdc42b61f Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 6 May 2021 15:36:45 +0200 Subject: [PATCH 009/102] Update to 0.63.91 - Rebase downstream patches --- .gitignore | 1 + ...mit-select-all-to-the-writable-regio.patch | 45 -- sources | 2 +- vte291-cntnr-precmd-preexec-scroll.patch | 397 ++++++++++-------- vte291-gcc11.patch | 13 - vte291.spec | 18 +- 6 files changed, 237 insertions(+), 239 deletions(-) delete mode 100644 0001-Revert-widget-Limit-select-all-to-the-writable-regio.patch delete mode 100644 vte291-gcc11.patch diff --git a/.gitignore b/.gitignore index 883639b..997905b 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,4 @@ /vte-0.62.1.tar.xz /vte-0.62.2.tar.xz /vte-0.62.3.tar.xz +/vte-0.63.91.tar.xz diff --git a/0001-Revert-widget-Limit-select-all-to-the-writable-regio.patch b/0001-Revert-widget-Limit-select-all-to-the-writable-regio.patch deleted file mode 100644 index 40d84d6..0000000 --- a/0001-Revert-widget-Limit-select-all-to-the-writable-regio.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 713732012fa06c26ce320cce732fe5bb56936b6c Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Tue, 16 Feb 2021 16:30:44 +0100 -Subject: [PATCH] Revert "widget: Limit select-all to the writable region not - including the scrollback" - -... as decided by Fedora Workstation WG. - -https://pagure.io/fedora-workstation/issue/216 - -This reverts commit 73713ec0644e232fb740170e399282be778d97f9. ---- - src/vte.cc | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/src/vte.cc b/src/vte.cc -index 5a631d96..88f053ef 100644 ---- a/src/vte.cc -+++ b/src/vte.cc -@@ -6719,10 +6719,7 @@ Terminal::maybe_end_selection() - /* - * Terminal::select_all: - * -- * Selects all text within the terminal. Note that we only select the writable -- * region, *not* the scrollback buffer, due to this potentially selecting so -- * much data that putting it on the clipboard either hangs the process for a long -- * time or even crash it directly. (FIXME!) -+ * Selects all text within the terminal (including the scrollback buffer). - */ - void - Terminal::select_all() -@@ -6731,8 +6728,8 @@ Terminal::select_all() - - m_selecting_had_delta = TRUE; - -- m_selection_resolved.set({m_screen->insert_delta, 0}, -- {_vte_ring_next(m_screen->row_data), 0}); -+ m_selection_resolved.set ({ _vte_ring_delta (m_screen->row_data), 0 }, -+ { _vte_ring_next (m_screen->row_data), 0 }); - - _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); - --- -2.29.2 - diff --git a/sources b/sources index 04c5626..a96a646 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.62.3.tar.xz) = 0475e2813b305bf1b5d48ece5959f2feb10e89b589fa3b75032ae466fd5254bf5c2fc6085dc296d65c5df84790a38892534ff401109843bf964ae62a8c540a81 +SHA512 (vte-0.63.91.tar.xz) = f14b655ccb6429eaaf064bbbdc12f2322b7c646b8f2808e7fc42101cb459829fe688adeeaff11e699932882fb7a8185de57010e41b5ab957ce6d727e489f74f5 diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index e86ce01..bdd78b7 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,7 +1,7 @@ -From 8d4a539a20142a3944e12f029ded76a27749296c Mon Sep 17 00:00:00 2001 +From 91271c5d9e29b572eb9285077378dcf0f6b82df3 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 -Subject: [PATCH 01/10] Add sequences and signals for desktop notification +Subject: [PATCH 01/11] Add sequences and signals for desktop notification Add sequences OSC 777 ; notify ; SUMMARY ; BODY BEL @@ -18,13 +18,13 @@ https://phab.enlightenment.org/T1765 https://bugzilla.gnome.org/show_bug.cgi?id=711059 --- src/marshal.list | 1 + - src/vte.cc | 9 +++++++++ + src/vte.cc | 8 ++++++++ src/vte/vteterminal.h | 4 +++- src/vtegtk.cc | 21 +++++++++++++++++++++ src/vtegtk.hh | 1 + src/vteinternal.hh | 8 ++++++++ src/vteseq.cc | 32 +++++++++++++++++++++++++++++++- - 7 files changed, 74 insertions(+), 2 deletions(-) + 7 files changed, 73 insertions(+), 2 deletions(-) diff --git a/src/marshal.list b/src/marshal.list index 241128c3ccfe..4412cf3d5f5c 100644 @@ -36,30 +36,29 @@ index 241128c3ccfe..4412cf3d5f5c 100644 VOID:STRING,UINT VOID:UINT,UINT diff --git a/src/vte.cc b/src/vte.cc -index 2614e5b4d20f..ac54d8791ba2 100644 +index 6f16873b3103..d935379df4d9 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10143,6 +10143,15 @@ Terminal::emit_pending_signals() +@@ -10100,6 +10100,14 @@ Terminal::emit_pending_signals() emit_adjustment_changed(); -+ if (m_notification_received) { ++ if (m_pending_changes & vte::to_integral(PendingChanges::NOTIFICATION)) { + _vte_debug_print (VTE_DEBUG_SIGNALS, + "Emitting `notification-received'.\n"); + g_signal_emit(freezer.get(), signals[SIGNAL_NOTIFICATION_RECEIVED], 0, + m_notification_summary.c_str(), + m_notification_body.c_str()); -+ m_notification_received = false; + } + - if (m_window_title_changed) { + if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index d5e96535a867..71c4c66cc4ee 100644 +index e705ece69ad6..668a7dbeae96 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -104,8 +104,10 @@ struct _VteTerminalClass { +@@ -102,8 +102,10 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); @@ -72,10 +71,10 @@ index d5e96535a867..71c4c66cc4ee 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 41de14ba1019..09a18439277f 100644 +index 090975b2c666..f535c6b1dea6 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -934,6 +934,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -985,6 +985,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->child_exited = NULL; klass->encoding_changed = NULL; klass->char_size_changed = NULL; @@ -83,7 +82,7 @@ index 41de14ba1019..09a18439277f 100644 klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1015,6 +1016,26 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1066,6 +1067,26 @@ vte_terminal_class_init(VteTerminalClass *klass) G_OBJECT_CLASS_TYPE(klass), g_cclosure_marshal_VOID__INTv); @@ -111,7 +110,7 @@ index 41de14ba1019..09a18439277f 100644 * VteTerminal::window-title-changed: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index cb207e57f928..b44dfd13a054 100644 +index 1cb8cb49967b..389b86d2e557 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -56,6 +56,7 @@ enum { @@ -123,22 +122,29 @@ index cb207e57f928..b44dfd13a054 100644 LAST_SIGNAL }; diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 333f858c164e..7608eecc38d9 100644 +index 7a257afed861..38aaf421ec30 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -917,6 +917,11 @@ public: +@@ -621,6 +621,10 @@ public: gboolean m_cursor_moved_pending; gboolean m_contents_changed_pending; + /* desktop notification */ -+ bool m_notification_received{false}; + std::string m_notification_summary; + std::string m_notification_body; + std::string m_window_title{}; std::string m_current_directory_uri{}; std::string m_current_file_uri{}; -@@ -1634,6 +1639,9 @@ public: +@@ -634,6 +638,7 @@ public: + TITLE = 1u << 0, + CWD = 1u << 1, + CWF = 1u << 2, ++ NOTIFICATION = 1u << 3, + }; + unsigned m_pending_changes{0}; + +@@ -1358,6 +1363,9 @@ public: int osc) noexcept; /* OSC handlers */ @@ -149,7 +155,7 @@ index 333f858c164e..7608eecc38d9 100644 vte::parser::StringTokeniser::const_iterator& token, vte::parser::StringTokeniser::const_iterator const& endtoken, diff --git a/src/vteseq.cc b/src/vteseq.cc -index ba9a2df6b9c4..c765b0bfb1f4 100644 +index bde2fa7ba0ab..7ab65b6d204a 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc @@ -1377,6 +1377,33 @@ Terminal::delete_lines(vte::grid::row_t param) @@ -172,7 +178,7 @@ index ba9a2df6b9c4..c765b0bfb1f4 100644 + + m_notification_summary = *token; + m_notification_body.clear(); -+ m_notification_received = true; ++ m_pending_changes |= vte::to_integral(PendingChanges::NOTIFICATION); + ++token; + + if (token == endtoken) @@ -186,7 +192,7 @@ index ba9a2df6b9c4..c765b0bfb1f4 100644 bool Terminal::get_osc_color_index(int osc, int value, -@@ -6475,6 +6502,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6519,6 +6546,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE); break; @@ -197,7 +203,7 @@ index ba9a2df6b9c4..c765b0bfb1f4 100644 case VTE_OSC_XTERM_SET_ICON_TITLE: case VTE_OSC_XTERM_SET_XPROPERTY: case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG: -@@ -6515,7 +6546,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6559,7 +6590,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC: case VTE_OSC_URXVT_VIEW_UP: case VTE_OSC_URXVT_VIEW_DOWN: @@ -206,13 +212,13 @@ index ba9a2df6b9c4..c765b0bfb1f4 100644 default: break; -- -2.29.2 +2.30.2 -From e75a6e2b9b4a1789ab7c2c1572e13c38dc73daf5 Mon Sep 17 00:00:00 2001 +From d332a11fe2118ce59d5d41acd0cf0194a9023511 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 -Subject: [PATCH 02/10] vte.sh: Emit OSC 777 from PROMPT_COMMAND +Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND For some reason, the three consecutive backslashes break the parsing. As Christian Persch suggested, replacing the double quotes with @@ -224,7 +230,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711059 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vte.sh.in b/src/vte.sh.in -index a12e254b6cba..f7c4fdeff30b 100644 +index 3ac99d7ec04f..2c6f668142c3 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in @@ -27,10 +27,12 @@ __vte_osc7 () { @@ -242,13 +248,13 @@ index a12e254b6cba..f7c4fdeff30b 100644 } -- -2.29.2 +2.30.2 -From d726c0779babba159dc01a1dd20c0a6678dbd4dc Mon Sep 17 00:00:00 2001 +From 671f9f5799d7683c30b6db69c24e7043b2f94eef Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 -Subject: [PATCH 03/10] Test the notification-received signal +Subject: [PATCH 03/11] Test the notification-received signal --- bindings/vala/app.vala | 7 +++++++ @@ -256,7 +262,7 @@ Subject: [PATCH 03/10] Test the notification-received signal 2 files changed, 17 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index fc26c2b0dfc3..634b8ddeeb91 100644 +index 8ab27e5aaf9a..025f971b2eb0 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -309,6 +309,8 @@ class Window : Gtk.ApplicationWindow @@ -281,10 +287,10 @@ index fc26c2b0dfc3..634b8ddeeb91 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index 6453ef8516f9..65521e1f4177 100644 +index 036eab8ff430..0e9c45a780e7 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1862,6 +1862,14 @@ window_window_title_changed_cb(VteTerminal* terminal, +@@ -1874,6 +1874,14 @@ window_window_title_changed_cb(VteTerminal* terminal, vte_terminal_get_window_title(window->terminal)); } @@ -299,7 +305,7 @@ index 6453ef8516f9..65521e1f4177 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2097,6 +2105,8 @@ vteapp_window_constructed(GObject *object) +@@ -2112,6 +2120,8 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); @@ -309,13 +315,13 @@ index 6453ef8516f9..65521e1f4177 100644 if (options.no_double_buffer) { G_GNUC_BEGIN_IGNORE_DEPRECATIONS; -- -2.29.2 +2.30.2 -From f3ec33fc7a644aa9a8d640af16e8ef87a7db5db7 Mon Sep 17 00:00:00 2001 +From 685d530a51f34d429c9605248016c1632dfc728f Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 -Subject: [PATCH 04/10] Add a property to configure the scroll speed +Subject: [PATCH 04/11] Add a property to configure the scroll speed By default, it is set to zero which gives the current behaviour of moving the buffer by a function of the number of visible rows. @@ -331,10 +337,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1103380 6 files changed, 71 insertions(+), 1 deletion(-) diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt -index c222e7fdff0b..6da5eff30715 100644 +index c69181da7c78..dba88c156fe8 100644 --- a/doc/reference/vte-sections.txt +++ b/doc/reference/vte-sections.txt -@@ -52,6 +52,7 @@ vte_terminal_get_cursor_blink_mode +@@ -54,6 +54,7 @@ vte_terminal_get_cursor_blink_mode vte_terminal_set_cursor_blink_mode vte_terminal_get_text_blink_mode vte_terminal_set_text_blink_mode @@ -343,18 +349,18 @@ index c222e7fdff0b..6da5eff30715 100644 vte_terminal_get_scrollback_lines vte_terminal_set_font diff --git a/src/vte.cc b/src/vte.cc -index ac54d8791ba2..68fc4bf8f448 100644 +index d935379df4d9..fee92d68f328 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -9342,6 +9342,7 @@ vte_cairo_get_clip_region (cairo_t *cr) +@@ -9293,6 +9293,7 @@ vte_cairo_get_clip_region (cairo_t *cr) bool - Terminal::widget_mouse_scroll(MouseEvent const& event) + Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) { + gdouble scroll_speed; gdouble v; gint cnt, i; int button; -@@ -9398,7 +9399,13 @@ Terminal::widget_mouse_scroll(MouseEvent const& event) +@@ -9327,7 +9328,13 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) return true; } @@ -369,7 +375,7 @@ index ac54d8791ba2..68fc4bf8f448 100644 _vte_debug_print(VTE_DEBUG_EVENTS, "Scroll speed is %d lines per non-smooth scroll unit\n", (int) v); -@@ -9701,6 +9708,16 @@ Terminal::decscusr_cursor_shape() const noexcept +@@ -9641,6 +9648,16 @@ Terminal::decscusr_cursor_shape() const noexcept } } @@ -387,10 +393,10 @@ index ac54d8791ba2..68fc4bf8f448 100644 Terminal::set_scrollback_lines(long lines) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 71c4c66cc4ee..203c77e08c57 100644 +index 668a7dbeae96..ea4fba199a26 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -306,6 +306,10 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, +@@ -310,6 +310,10 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, _VTE_PUBLIC VteCursorShape vte_terminal_get_cursor_shape(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); @@ -402,10 +408,10 @@ index 71c4c66cc4ee..203c77e08c57 100644 _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 09a18439277f..934e0ab2bd37 100644 +index f535c6b1dea6..062deb445ac6 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -712,6 +712,9 @@ try +@@ -760,6 +760,9 @@ try case PROP_REWRAP_ON_RESIZE: g_value_set_boolean (value, vte_terminal_get_rewrap_on_resize (terminal)); break; @@ -415,7 +421,7 @@ index 09a18439277f..934e0ab2bd37 100644 case PROP_SCROLLBACK_LINES: g_value_set_uint (value, vte_terminal_get_scrollback_lines(terminal)); break; -@@ -827,6 +830,9 @@ try +@@ -878,6 +881,9 @@ try case PROP_REWRAP_ON_RESIZE: vte_terminal_set_rewrap_on_resize (terminal, g_value_get_boolean (value)); break; @@ -425,7 +431,7 @@ index 09a18439277f..934e0ab2bd37 100644 case PROP_SCROLLBACK_LINES: vte_terminal_set_scrollback_lines (terminal, g_value_get_uint (value)); break; -@@ -1917,6 +1923,21 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1968,6 +1974,21 @@ vte_terminal_class_init(VteTerminalClass *klass) TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -447,7 +453,7 @@ index 09a18439277f..934e0ab2bd37 100644 /** * VteTerminal:scrollback-lines: * -@@ -5323,6 +5344,30 @@ catch (...) +@@ -5389,6 +5410,30 @@ catch (...) return -1; } @@ -479,10 +485,10 @@ index 09a18439277f..934e0ab2bd37 100644 * vte_terminal_set_scrollback_lines: * @terminal: a #VteTerminal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index b44dfd13a054..30b917786b5b 100644 +index 389b86d2e557..24063c3060da 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -89,6 +89,7 @@ enum { +@@ -90,6 +90,7 @@ enum { PROP_MOUSE_POINTER_AUTOHIDE, PROP_PTY, PROP_REWRAP_ON_RESIZE, @@ -491,33 +497,33 @@ index b44dfd13a054..30b917786b5b 100644 PROP_SCROLL_ON_KEYSTROKE, PROP_SCROLL_ON_OUTPUT, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 7608eecc38d9..79ea9e7f0da0 100644 +index 38aaf421ec30..fd1a8b9008cf 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -696,6 +696,7 @@ public: - /* Scrolling options. */ +@@ -399,6 +399,7 @@ public: + bool m_fallback_scrolling{true}; bool m_scroll_on_output{false}; bool m_scroll_on_keystroke{true}; + guint m_scroll_speed; vte::grid::row_t m_scrollback_lines{0}; /* Restricted scrolling */ -@@ -1512,6 +1513,7 @@ public: +@@ -1232,6 +1233,7 @@ public: bool set_input_enabled(bool enabled); bool set_mouse_autohide(bool autohide); bool set_rewrap_on_resize(bool rewrap); + bool set_scroll_speed(unsigned int scroll_speed); bool set_scrollback_lines(long lines); - bool set_scroll_on_keystroke(bool scroll); - bool set_scroll_on_output(bool scroll); + bool set_fallback_scrolling(bool set); + auto fallback_scrolling() const noexcept { return m_fallback_scrolling; } -- -2.29.2 +2.30.2 -From 9538e23477d7e99909961f7ea5868f9c19c043e1 Mon Sep 17 00:00:00 2001 +From 94ccc632098d038198272bcea7704f5b73f7349e Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 -Subject: [PATCH 05/10] Test the scroll-speed property +Subject: [PATCH 05/11] Test the scroll-speed property https://bugzilla.redhat.com/show_bug.cgi?id=1103380 --- @@ -526,7 +532,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1103380 2 files changed, 8 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 634b8ddeeb91..c984b868246d 100644 +index 025f971b2eb0..51b5d6410503 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -335,6 +335,7 @@ class Window : Gtk.ApplicationWindow @@ -555,10 +561,10 @@ index 634b8ddeeb91..c984b868246d 100644 "Specify the number of scrollback-lines", null }, { "transparent", 'T', 0, OptionArg.INT, ref transparency_percent, diff --git a/src/app/app.cc b/src/app/app.cc -index 65521e1f4177..28e934d9d9c0 100644 +index 0e9c45a780e7..48939782e59d 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -108,6 +108,7 @@ public: +@@ -115,6 +115,7 @@ public: int verbosity{0}; double cell_height_scale{1.0}; double cell_width_scale{1.0}; @@ -566,7 +572,7 @@ index 65521e1f4177..28e934d9d9c0 100644 VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM}; VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK}; VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS}; -@@ -580,6 +581,8 @@ public: +@@ -589,6 +590,8 @@ public: "Reverse foreground/background colors", nullptr }, { "require-systemd-scope", 0, 0, G_OPTION_ARG_NONE, &require_systemd_scope, "Require use of a systemd user scope", nullptr }, @@ -575,7 +581,7 @@ index 65521e1f4177..28e934d9d9c0 100644 { "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines, "Specify the number of scrollback-lines (-1 for infinite)", nullptr }, { "transparent", 'T', 0, G_OPTION_ARG_INT, &transparency_percent, -@@ -2138,6 +2141,7 @@ vteapp_window_constructed(GObject *object) +@@ -2154,6 +2157,7 @@ vteapp_window_constructed(GObject *object) vte_terminal_set_rewrap_on_resize(window->terminal, !options.no_rewrap); vte_terminal_set_scroll_on_output(window->terminal, false); vte_terminal_set_scroll_on_keystroke(window->terminal, true); @@ -584,13 +590,13 @@ index 65521e1f4177..28e934d9d9c0 100644 vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); -- -2.29.2 +2.30.2 -From 8e616fea1e377e03d5f3cbac0786df5e76da896d Mon Sep 17 00:00:00 2001 +From 4e34ad6a42617f89e197a797bd4cfe8f56616fb9 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 -Subject: [PATCH 06/10] Support preexec notifications from an interactive shell +Subject: [PATCH 06/11] Support preexec notifications from an interactive shell Add sequences OSC 777 ; preexec BEL @@ -606,35 +612,34 @@ https://phab.enlightenment.org/T1765 https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 --- - src/vte.cc | 7 +++++++ + src/vte.cc | 6 ++++++ src/vte.sh.in | 2 +- src/vte/vteterminal.h | 3 ++- src/vtegtk.cc | 18 ++++++++++++++++++ src/vtegtk.hh | 1 + - src/vteinternal.hh | 2 ++ + src/vteinternal.hh | 1 + src/vteseq.cc | 4 ++++ - 7 files changed, 35 insertions(+), 2 deletions(-) + 7 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 68fc4bf8f448..09068deebdf2 100644 +index fee92d68f328..481e171fcd0a 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10169,6 +10169,13 @@ Terminal::emit_pending_signals() - m_notification_received = false; +@@ -10125,6 +10125,12 @@ Terminal::emit_pending_signals() + m_notification_body.c_str()); } -+ if (m_shell_preexec) { ++ if (m_pending_changes & vte::to_integral(PendingChanges::SHELL_PREEXEC)) { + _vte_debug_print (VTE_DEBUG_SIGNALS, + "Emitting `shell-preexec'.\n"); + g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); -+ m_shell_preexec = FALSE; + } + - if (m_window_title_changed) { + if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte.sh.in b/src/vte.sh.in -index f7c4fdeff30b..ec094db032c7 100644 +index 2c6f668142c3..fc33a63f1f84 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in @@ -38,7 +38,7 @@ __vte_prompt_command() { @@ -647,10 +652,10 @@ index f7c4fdeff30b..ec094db032c7 100644 ;; esac diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 203c77e08c57..5668ac7d71df 100644 +index ea4fba199a26..1fb8b061c9e3 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -105,9 +105,10 @@ struct _VteTerminalClass { +@@ -103,9 +103,10 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); @@ -663,10 +668,10 @@ index 203c77e08c57..5668ac7d71df 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 934e0ab2bd37..0bba24ee534f 100644 +index 062deb445ac6..2fe3067d650d 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -941,6 +941,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -992,6 +992,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->encoding_changed = NULL; klass->char_size_changed = NULL; klass->notification_received = NULL; @@ -674,7 +679,7 @@ index 934e0ab2bd37..0bba24ee534f 100644 klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1042,6 +1043,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1093,6 +1094,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -699,7 +704,7 @@ index 934e0ab2bd37..0bba24ee534f 100644 * VteTerminal::window-title-changed: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 30b917786b5b..d3ad1435ae53 100644 +index 24063c3060da..e90e183e7c2d 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -52,6 +52,7 @@ enum { @@ -711,20 +716,19 @@ index 30b917786b5b..d3ad1435ae53 100644 SIGNAL_TEXT_INSERTED, SIGNAL_TEXT_MODIFIED, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 79ea9e7f0da0..009500a3ffc6 100644 +index fd1a8b9008cf..bb98f8bc0903 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -923,6 +923,8 @@ public: - std::string m_notification_summary; - std::string m_notification_body; +@@ -640,6 +640,7 @@ public: + CWD = 1u << 1, + CWF = 1u << 2, + NOTIFICATION = 1u << 3, ++ SHELL_PREEXEC = 1u << 4, + }; + unsigned m_pending_changes{0}; -+ gboolean m_shell_preexec; -+ - std::string m_window_title{}; - std::string m_current_directory_uri{}; - std::string m_current_file_uri{}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index c765b0bfb1f4..ad5935063bd9 100644 +index 7ab65b6d204a..51ca37bdc748 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc @@ -1402,6 +1402,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, @@ -733,19 +737,19 @@ index c765b0bfb1f4..ad5935063bd9 100644 } + + if (*token == "preexec") { -+ m_shell_preexec = TRUE; ++ m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PREEXEC); + } } bool -- -2.29.2 +2.30.2 -From c7c410786da41bf9bbcdf8ca1be21dcf0d89637d Mon Sep 17 00:00:00 2001 +From 1e0477937a0f18955ea9b86027fd902dba6d0574 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 -Subject: [PATCH 07/10] Test the shell-preexec signal +Subject: [PATCH 07/11] Test the shell-preexec signal https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 @@ -755,7 +759,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 2 files changed, 13 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index c984b868246d..83af686be106 100644 +index 51b5d6410503..3975b9886d77 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -310,6 +310,7 @@ class Window : Gtk.ApplicationWindow @@ -779,10 +783,10 @@ index c984b868246d..83af686be106 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index 28e934d9d9c0..c9f7b5637d16 100644 +index 48939782e59d..e55f8c1339fa 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1873,6 +1873,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -1885,6 +1885,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -795,7 +799,7 @@ index 28e934d9d9c0..c9f7b5637d16 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2109,6 +2115,7 @@ vteapp_window_constructed(GObject *object) +@@ -2124,6 +2130,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -804,13 +808,13 @@ index 28e934d9d9c0..c9f7b5637d16 100644 /* Settings */ if (options.no_double_buffer) { -- -2.29.2 +2.30.2 -From 034f0a8ae047af6d6a2ee9c443b6686a4eff3018 Mon Sep 17 00:00:00 2001 +From 61368448bec45743de4604e601eda2e594ecf485 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 -Subject: [PATCH 08/10] Support precmd notifications from an interactive shell +Subject: [PATCH 08/11] Support precmd notifications from an interactive shell Add sequences OSC 777 ; precmd BEL @@ -826,35 +830,34 @@ https://phab.enlightenment.org/T1765 https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 --- - src/vte.cc | 7 +++++++ + src/vte.cc | 6 ++++++ src/vte.sh.in | 2 +- src/vte/vteterminal.h | 3 ++- src/vtegtk.cc | 18 ++++++++++++++++++ src/vtegtk.hh | 1 + src/vteinternal.hh | 1 + src/vteseq.cc | 4 +++- - 7 files changed, 33 insertions(+), 3 deletions(-) + 7 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 09068deebdf2..6d3d3c5a2854 100644 +index 481e171fcd0a..c57ca3a7fd8c 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10176,6 +10176,13 @@ Terminal::emit_pending_signals() - m_shell_preexec = FALSE; +@@ -10131,6 +10131,12 @@ Terminal::emit_pending_signals() + g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); } -+ if (m_shell_precmd) { ++ if (m_pending_changes & vte::to_integral(PendingChanges::SHELL_PRECMD)) { + _vte_debug_print (VTE_DEBUG_SIGNALS, + "Emitting `shell-precmd'.\n"); + g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PRECMD], 0); -+ m_shell_precmd = FALSE; + } + - if (m_window_title_changed) { + if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte.sh.in b/src/vte.sh.in -index ec094db032c7..18bb266e8d87 100644 +index fc33a63f1f84..359afbc4645c 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in @@ -32,7 +32,7 @@ __vte_prompt_command() { @@ -867,10 +870,10 @@ index ec094db032c7..18bb266e8d87 100644 } diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 5668ac7d71df..cbd2a77f9f29 100644 +index 1fb8b061c9e3..0b77566ac2f8 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -105,10 +105,11 @@ struct _VteTerminalClass { +@@ -103,10 +103,11 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); @@ -884,10 +887,10 @@ index 5668ac7d71df..cbd2a77f9f29 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 0bba24ee534f..4e0bc3a68464 100644 +index 2fe3067d650d..27729dc35db6 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -941,6 +941,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -992,6 +992,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->encoding_changed = NULL; klass->char_size_changed = NULL; klass->notification_received = NULL; @@ -895,7 +898,7 @@ index 0bba24ee534f..4e0bc3a68464 100644 klass->shell_preexec = NULL; klass->window_title_changed = NULL; klass->icon_title_changed = NULL; -@@ -1043,6 +1044,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1094,6 +1095,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -920,7 +923,7 @@ index 0bba24ee534f..4e0bc3a68464 100644 * VteTerminal::shell-preexec: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index d3ad1435ae53..85c2a38d61ec 100644 +index e90e183e7c2d..93a6dde3e19a 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -52,6 +52,7 @@ enum { @@ -932,19 +935,19 @@ index d3ad1435ae53..85c2a38d61ec 100644 SIGNAL_TEXT_DELETED, SIGNAL_TEXT_INSERTED, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 009500a3ffc6..18ffeaf3a270 100644 +index bb98f8bc0903..25253c0af95b 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -923,6 +923,7 @@ public: - std::string m_notification_summary; - std::string m_notification_body; +@@ -641,6 +641,7 @@ public: + CWF = 1u << 2, + NOTIFICATION = 1u << 3, + SHELL_PREEXEC = 1u << 4, ++ SHELL_PRECMD = 1u << 5, + }; + unsigned m_pending_changes{0}; -+ gboolean m_shell_precmd; - gboolean m_shell_preexec; - - std::string m_window_title{}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index ad5935063bd9..4b66681d713c 100644 +index 51ca37bdc748..10b494bddb47 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc @@ -1403,7 +1403,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, @@ -953,19 +956,19 @@ index ad5935063bd9..4b66681d713c 100644 - if (*token == "preexec") { + if (*token == "precmd") { -+ m_shell_precmd = TRUE; ++ m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PRECMD); + } else if (*token == "preexec") { - m_shell_preexec = TRUE; + m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PREEXEC); } } -- -2.29.2 +2.30.2 -From 6083ed32c023a7a24f4b4856147a0970d59f9a35 Mon Sep 17 00:00:00 2001 +From 892a472d0accf4457b4e31635b7730dccec66ba7 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 -Subject: [PATCH 09/10] Test the shell-precmd signal +Subject: [PATCH 09/11] Test the shell-precmd signal https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 @@ -975,7 +978,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 2 files changed, 13 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 83af686be106..300384f5c74b 100644 +index 3975b9886d77..ff5fb5df052e 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -310,6 +310,7 @@ class Window : Gtk.ApplicationWindow @@ -999,10 +1002,10 @@ index 83af686be106..300384f5c74b 100644 { print("[shell] executing command\n"); diff --git a/src/app/app.cc b/src/app/app.cc -index c9f7b5637d16..b679bc0bff50 100644 +index e55f8c1339fa..4dd0fb8dc06b 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1873,6 +1873,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -1885,6 +1885,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -1015,7 +1018,7 @@ index c9f7b5637d16..b679bc0bff50 100644 static void shell_preexec_cb(VteTerminal *terminal) { -@@ -2115,6 +2121,7 @@ vteapp_window_constructed(GObject *object) +@@ -2130,6 +2136,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -1024,13 +1027,13 @@ index c9f7b5637d16..b679bc0bff50 100644 /* Settings */ -- -2.29.2 +2.30.2 -From b0a81273d4ff929afa4e37750273980e70017c77 Mon Sep 17 00:00:00 2001 +From d85e9f74c6f506ee7fa168748264e8eccb0727c8 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 -Subject: [PATCH 10/10] Support tracking the active container inside the +Subject: [PATCH 10/11] Support tracking the active container inside the terminal Add sequences @@ -1060,39 +1063,38 @@ agreed upon across multiple different terminal emulators [1]. [1] https://gitlab.freedesktop.org/terminal-wg/specifications/issues/17 --- - src/vte.cc | 9 +++++ + src/vte.cc | 8 ++++ src/vte/vteterminal.h | 4 ++ src/vtegtk.cc | 77 ++++++++++++++++++++++++++++++++++++++ src/vtegtk.hh | 2 + src/vteinternal.hh | 16 ++++++++ src/vteseq.cc | 86 +++++++++++++++++++++++++++++++++++++++++++ - 6 files changed, 194 insertions(+) + 6 files changed, 193 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index 6d3d3c5a2854..74db14f593dd 100644 +index c57ca3a7fd8c..9f025316d45b 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10197,6 +10197,15 @@ Terminal::emit_pending_signals() - m_window_title_changed = false; +@@ -10150,6 +10150,14 @@ Terminal::emit_pending_signals() + m_window_title_pending.clear(); } -+ if (m_containers_changed) { ++ if (m_pending_changes & vte::to_integral(PendingChanges::CONTAINERS)) { + _vte_debug_print(VTE_DEBUG_SIGNALS, + "Notifying `current-container-name' and `current-container-runtime'.\n"); + + g_object_notify_by_pspec(freezer.get(), pspecs[PROP_CURRENT_CONTAINER_NAME]); + g_object_notify_by_pspec(freezer.get(), pspecs[PROP_CURRENT_CONTAINER_RUNTIME]); -+ m_containers_changed = false; + } + - if (m_current_directory_uri_changed) { + if (m_pending_changes & vte::to_integral(PendingChanges::CWD)) { if (m_current_directory_uri != m_current_directory_uri_pending) { m_current_directory_uri.swap(m_current_directory_uri_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index cbd2a77f9f29..15aa421a0c68 100644 +index 0b77566ac2f8..540fd25a6866 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -484,6 +484,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT +@@ -488,6 +488,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT _VTE_PUBLIC const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); _VTE_PUBLIC @@ -1104,10 +1106,10 @@ index cbd2a77f9f29..15aa421a0c68 100644 _VTE_PUBLIC const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 4e0bc3a68464..2e6859798c42 100644 +index 27729dc35db6..37fead40ca0d 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -664,6 +664,12 @@ try +@@ -709,6 +709,12 @@ try case PROP_CURSOR_BLINK_MODE: g_value_set_enum (value, vte_terminal_get_cursor_blink_mode (terminal)); break; @@ -1120,7 +1122,7 @@ index 4e0bc3a68464..2e6859798c42 100644 case PROP_CURRENT_DIRECTORY_URI: g_value_set_string (value, vte_terminal_get_current_directory_uri (terminal)); break; -@@ -2036,6 +2042,27 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2101,6 +2107,27 @@ vte_terminal_class_init(VteTerminalClass *klass) NULL, (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -1148,7 +1150,7 @@ index 4e0bc3a68464..2e6859798c42 100644 /** * VteTerminal:current-directory-uri: * -@@ -4530,6 +4557,56 @@ catch (...) +@@ -4596,6 +4623,56 @@ catch (...) return -1; } @@ -1206,7 +1208,7 @@ index 4e0bc3a68464..2e6859798c42 100644 * vte_terminal_get_current_directory_uri: * @terminal: a #VteTerminal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 85c2a38d61ec..a258902a3092 100644 +index 93a6dde3e19a..651961436225 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -76,6 +76,8 @@ enum { @@ -1219,10 +1221,10 @@ index 85c2a38d61ec..a258902a3092 100644 PROP_CURRENT_FILE_URI, PROP_DELETE_BINDING, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 18ffeaf3a270..f6b98f670ad5 100644 +index 25253c0af95b..570c70b0c9e7 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -56,6 +56,7 @@ +@@ -59,6 +59,7 @@ #include #include #include @@ -1230,7 +1232,7 @@ index 18ffeaf3a270..f6b98f670ad5 100644 #include #include #include -@@ -94,6 +95,18 @@ typedef enum _VteCharacterReplacement { +@@ -97,6 +98,18 @@ typedef enum _VteCharacterReplacement { VTE_CHARACTER_REPLACEMENT_LINE_DRAWING } VteCharacterReplacement; @@ -1249,21 +1251,28 @@ index 18ffeaf3a270..f6b98f670ad5 100644 typedef struct _VtePaletteColor { struct { vte::color::rgb color; -@@ -918,6 +931,9 @@ public: +@@ -622,6 +635,8 @@ public: gboolean m_cursor_moved_pending; gboolean m_contents_changed_pending; -+ bool m_containers_changed{false}; + std::stack m_containers; + /* desktop notification */ - bool m_notification_received{false}; std::string m_notification_summary; + std::string m_notification_body; +@@ -642,6 +657,7 @@ public: + NOTIFICATION = 1u << 3, + SHELL_PREEXEC = 1u << 4, + SHELL_PRECMD = 1u << 5, ++ CONTAINERS = 1u << 6, + }; + unsigned m_pending_changes{0}; + diff --git a/src/vteseq.cc b/src/vteseq.cc -index 4b66681d713c..4240896b95e8 100644 +index 10b494bddb47..2a2ba4b47441 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -20,10 +20,14 @@ +@@ -19,10 +19,14 @@ #include "config.h" @@ -1305,7 +1314,7 @@ index 4b66681d713c..4240896b95e8 100644 + if (token == endtoken) { + if (!m_containers.empty()) { + m_containers.pop(); -+ m_containers_changed = true; ++ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); + } + + return; @@ -1320,7 +1329,7 @@ index 4b66681d713c..4240896b95e8 100644 + if (uid_token == uid_str) { + if (!m_containers.empty()) { + m_containers.pop(); -+ m_containers_changed = true; ++ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); + } + + return; @@ -1342,7 +1351,7 @@ index 4b66681d713c..4240896b95e8 100644 + + if (token == endtoken) { + m_containers.emplace(name, runtime); -+ m_containers_changed = true; ++ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); + return; + } + @@ -1354,7 +1363,7 @@ index 4b66681d713c..4240896b95e8 100644 + + if (uid_token == uid_str) { + m_containers.emplace(name, runtime); -+ m_containers_changed = true; ++ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); + return; + } + @@ -1368,5 +1377,51 @@ index 4b66681d713c..4240896b95e8 100644 ++token; -- -2.29.2 +2.30.2 + + +From e902b6ea9a041a468ab47fec20542a8fca3c9e57 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 16 Feb 2021 16:30:44 +0100 +Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region + not including the scrollback" + +... as decided by Fedora Workstation WG. + +https://pagure.io/fedora-workstation/issue/216 + +This reverts commit 73713ec0644e232fb740170e399282be778d97f9. +--- + src/vte.cc | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/vte.cc b/src/vte.cc +index 9f025316d45b..0a6d0bc4a96e 100644 +--- a/src/vte.cc ++++ b/src/vte.cc +@@ -6595,10 +6595,7 @@ Terminal::maybe_end_selection() + /* + * Terminal::select_all: + * +- * Selects all text within the terminal. Note that we only select the writable +- * region, *not* the scrollback buffer, due to this potentially selecting so +- * much data that putting it on the clipboard either hangs the process for a long +- * time or even crash it directly. (FIXME!) ++ * Selects all text within the terminal (including the scrollback buffer). + */ + void + Terminal::select_all() +@@ -6607,8 +6604,8 @@ Terminal::select_all() + + m_selecting_had_delta = TRUE; + +- m_selection_resolved.set({m_screen->insert_delta, 0}, +- {_vte_ring_next(m_screen->row_data), 0}); ++ m_selection_resolved.set ({ _vte_ring_delta (m_screen->row_data), 0 }, ++ { _vte_ring_next (m_screen->row_data), 0 }); + + _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); + +-- +2.30.2 diff --git a/vte291-gcc11.patch b/vte291-gcc11.patch deleted file mode 100644 index 971b56c..0000000 --- a/vte291-gcc11.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/vtetypebuiltins.cc.template b/src/vtetypebuiltins.cc.template -index dade41d..4c8b5c4 100644 ---- a/src/vtetypebuiltins.cc.template -+++ b/src/vtetypebuiltins.cc.template -@@ -11,7 +11,7 @@ - GType - @enum_name@_get_type (void) - { -- static volatile gsize g_define_type_id__volatile = 0; -+ static gsize g_define_type_id__volatile = 0; - - if (g_once_init_enter (&g_define_type_id__volatile)) { - static const G@Type@Value values[] = { diff --git a/vte291.spec b/vte291.spec index 9aacd57..6547d25 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,21 +10,18 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.62.3 -Release: 2%{?dist} +Version: 0.63.91 +Release: 1%{?dist} Summary: Terminal emulator library License: LGPLv2+ URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.62/vte-%{version}.tar.xz - -# https://pagure.io/fedora-workstation/issue/216 -Patch0: 0001-Revert-widget-Limit-select-all-to-the-writable-regio.patch +Source0: https://download.gnome.org/sources/vte/0.63/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 +# https://pagure.io/fedora-workstation/issue/216 Patch100: vte291-cntnr-precmd-preexec-scroll.patch -Patch101: %{name}-gcc11.patch BuildRequires: gcc-c++ BuildRequires: gettext @@ -86,9 +83,7 @@ emulator library. %prep %setup -q -n vte-%{version} -%patch0 -p1 -b .revert-select-all %patch100 -p1 -b .cntnr-precmd-preexec-scroll -%patch101 -p1 -b .gcc11 %if 0%{?flatpak} # Install user units where systemd macros expect them sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build @@ -115,6 +110,7 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_libdir}/libvte-%{apiver}.so %{_libdir}/pkgconfig/vte-%{apiver}.pc %{_datadir}/gir-1.0/ +%{_datadir}/glade/ %doc %{_datadir}/gtk-doc/ %{_datadir}/vala/ @@ -124,6 +120,10 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Thu May 06 2021 Debarshi Ray - 0.63.91-1 +- Update to 0.63.91 +- Rebase downstream patches + * Thu Feb 18 2021 Kalev Lember - 0.62.3-2 - Revert a change that limited select all, as decided by Workstation WG From f4f46a28d2b694afdaa40cd3230f7e8ce4584c83 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 6 May 2021 16:17:46 +0200 Subject: [PATCH 010/102] Update to 0.64.0 --- .gitignore | 1 + sources | 2 +- vte291-cntnr-precmd-preexec-scroll.patch | 84 ++++++++++++------------ vte291.spec | 7 +- 4 files changed, 49 insertions(+), 45 deletions(-) diff --git a/.gitignore b/.gitignore index 997905b..a9f1360 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,4 @@ /vte-0.62.2.tar.xz /vte-0.62.3.tar.xz /vte-0.63.91.tar.xz +/vte-0.64.0.tar.xz diff --git a/sources b/sources index a96a646..5d91078 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.63.91.tar.xz) = f14b655ccb6429eaaf064bbbdc12f2322b7c646b8f2808e7fc42101cb459829fe688adeeaff11e699932882fb7a8185de57010e41b5ab957ce6d727e489f74f5 +SHA512 (vte-0.64.0.tar.xz) = 64c329d192ac4d48676d06a256a72f7e723779800e01c3ae81a0791224d4ca2ed967941d31678d6a97cde90493c3d670cd9f310437523be9e06bab3db72c5399 diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index bdd78b7..811eca5 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,4 +1,4 @@ -From 91271c5d9e29b572eb9285077378dcf0f6b82df3 Mon Sep 17 00:00:00 2001 +From a0a85edaed44a37c1f35e5cad372ba1dee4f270a Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 01/11] Add sequences and signals for desktop notification @@ -71,10 +71,10 @@ index e705ece69ad6..668a7dbeae96 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 090975b2c666..f535c6b1dea6 100644 +index 0a26f976649b..8c31a2895886 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -985,6 +985,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -983,6 +983,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->child_exited = NULL; klass->encoding_changed = NULL; klass->char_size_changed = NULL; @@ -82,7 +82,7 @@ index 090975b2c666..f535c6b1dea6 100644 klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1066,6 +1067,26 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1064,6 +1065,26 @@ vte_terminal_class_init(VteTerminalClass *klass) G_OBJECT_CLASS_TYPE(klass), g_cclosure_marshal_VOID__INTv); @@ -215,7 +215,7 @@ index bde2fa7ba0ab..7ab65b6d204a 100644 2.30.2 -From d332a11fe2118ce59d5d41acd0cf0194a9023511 Mon Sep 17 00:00:00 2001 +From 168571d31e16014649f09b972c63ea78755249e0 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND @@ -251,7 +251,7 @@ index 3ac99d7ec04f..2c6f668142c3 100644 2.30.2 -From 671f9f5799d7683c30b6db69c24e7043b2f94eef Mon Sep 17 00:00:00 2001 +From faa8026184179478358fa24fdbc6321a81fbea2b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 Subject: [PATCH 03/11] Test the notification-received signal @@ -287,10 +287,10 @@ index 8ab27e5aaf9a..025f971b2eb0 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index 036eab8ff430..0e9c45a780e7 100644 +index 37d51c6b8963..73810251a4d0 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1874,6 +1874,14 @@ window_window_title_changed_cb(VteTerminal* terminal, +@@ -1877,6 +1877,14 @@ window_window_title_changed_cb(VteTerminal* terminal, vte_terminal_get_window_title(window->terminal)); } @@ -305,7 +305,7 @@ index 036eab8ff430..0e9c45a780e7 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2112,6 +2120,8 @@ vteapp_window_constructed(GObject *object) +@@ -2115,6 +2123,8 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); @@ -318,7 +318,7 @@ index 036eab8ff430..0e9c45a780e7 100644 2.30.2 -From 685d530a51f34d429c9605248016c1632dfc728f Mon Sep 17 00:00:00 2001 +From e2de3222438099a4baeea2fc5dd27f0b1e94ed5f Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 Subject: [PATCH 04/11] Add a property to configure the scroll speed @@ -408,10 +408,10 @@ index 668a7dbeae96..ea4fba199a26 100644 _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index f535c6b1dea6..062deb445ac6 100644 +index 8c31a2895886..c5c8eb2fdc8d 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -760,6 +760,9 @@ try +@@ -758,6 +758,9 @@ try case PROP_REWRAP_ON_RESIZE: g_value_set_boolean (value, vte_terminal_get_rewrap_on_resize (terminal)); break; @@ -421,7 +421,7 @@ index f535c6b1dea6..062deb445ac6 100644 case PROP_SCROLLBACK_LINES: g_value_set_uint (value, vte_terminal_get_scrollback_lines(terminal)); break; -@@ -878,6 +881,9 @@ try +@@ -876,6 +879,9 @@ try case PROP_REWRAP_ON_RESIZE: vte_terminal_set_rewrap_on_resize (terminal, g_value_get_boolean (value)); break; @@ -431,7 +431,7 @@ index f535c6b1dea6..062deb445ac6 100644 case PROP_SCROLLBACK_LINES: vte_terminal_set_scrollback_lines (terminal, g_value_get_uint (value)); break; -@@ -1968,6 +1974,21 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1966,6 +1972,21 @@ vte_terminal_class_init(VteTerminalClass *klass) TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -453,7 +453,7 @@ index f535c6b1dea6..062deb445ac6 100644 /** * VteTerminal:scrollback-lines: * -@@ -5389,6 +5410,30 @@ catch (...) +@@ -5367,6 +5388,30 @@ catch (...) return -1; } @@ -520,7 +520,7 @@ index 38aaf421ec30..fd1a8b9008cf 100644 2.30.2 -From 94ccc632098d038198272bcea7704f5b73f7349e Mon Sep 17 00:00:00 2001 +From 91e5010be14c0f85760744c6b3fb356a364eb9fe Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 Subject: [PATCH 05/11] Test the scroll-speed property @@ -561,10 +561,10 @@ index 025f971b2eb0..51b5d6410503 100644 "Specify the number of scrollback-lines", null }, { "transparent", 'T', 0, OptionArg.INT, ref transparency_percent, diff --git a/src/app/app.cc b/src/app/app.cc -index 0e9c45a780e7..48939782e59d 100644 +index 73810251a4d0..90421730a66a 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -115,6 +115,7 @@ public: +@@ -116,6 +116,7 @@ public: int verbosity{0}; double cell_height_scale{1.0}; double cell_width_scale{1.0}; @@ -572,7 +572,7 @@ index 0e9c45a780e7..48939782e59d 100644 VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM}; VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK}; VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS}; -@@ -589,6 +590,8 @@ public: +@@ -590,6 +591,8 @@ public: "Reverse foreground/background colors", nullptr }, { "require-systemd-scope", 0, 0, G_OPTION_ARG_NONE, &require_systemd_scope, "Require use of a systemd user scope", nullptr }, @@ -581,7 +581,7 @@ index 0e9c45a780e7..48939782e59d 100644 { "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines, "Specify the number of scrollback-lines (-1 for infinite)", nullptr }, { "transparent", 'T', 0, G_OPTION_ARG_INT, &transparency_percent, -@@ -2154,6 +2157,7 @@ vteapp_window_constructed(GObject *object) +@@ -2157,6 +2160,7 @@ vteapp_window_constructed(GObject *object) vte_terminal_set_rewrap_on_resize(window->terminal, !options.no_rewrap); vte_terminal_set_scroll_on_output(window->terminal, false); vte_terminal_set_scroll_on_keystroke(window->terminal, true); @@ -593,7 +593,7 @@ index 0e9c45a780e7..48939782e59d 100644 2.30.2 -From 4e34ad6a42617f89e197a797bd4cfe8f56616fb9 Mon Sep 17 00:00:00 2001 +From 999e04a183fff7b25918f7253aaeb200eb00d5e6 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 06/11] Support preexec notifications from an interactive shell @@ -668,10 +668,10 @@ index ea4fba199a26..1fb8b061c9e3 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 062deb445ac6..2fe3067d650d 100644 +index c5c8eb2fdc8d..e2a6462f2b61 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -992,6 +992,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -990,6 +990,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->encoding_changed = NULL; klass->char_size_changed = NULL; klass->notification_received = NULL; @@ -679,7 +679,7 @@ index 062deb445ac6..2fe3067d650d 100644 klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1093,6 +1094,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1091,6 +1092,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -746,7 +746,7 @@ index 7ab65b6d204a..51ca37bdc748 100644 2.30.2 -From 1e0477937a0f18955ea9b86027fd902dba6d0574 Mon Sep 17 00:00:00 2001 +From 309fda0ced97797d592f772017570e16ba23ebab Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 Subject: [PATCH 07/11] Test the shell-preexec signal @@ -783,10 +783,10 @@ index 51b5d6410503..3975b9886d77 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index 48939782e59d..e55f8c1339fa 100644 +index 90421730a66a..3caec42e5877 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1885,6 +1885,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -1888,6 +1888,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -799,7 +799,7 @@ index 48939782e59d..e55f8c1339fa 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2124,6 +2130,7 @@ vteapp_window_constructed(GObject *object) +@@ -2127,6 +2133,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -811,7 +811,7 @@ index 48939782e59d..e55f8c1339fa 100644 2.30.2 -From 61368448bec45743de4604e601eda2e594ecf485 Mon Sep 17 00:00:00 2001 +From 75d0ca735a57504824c9e475c81bfb075f4df721 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 08/11] Support precmd notifications from an interactive shell @@ -887,10 +887,10 @@ index 1fb8b061c9e3..0b77566ac2f8 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 2fe3067d650d..27729dc35db6 100644 +index e2a6462f2b61..4b71437d117c 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -992,6 +992,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -990,6 +990,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->encoding_changed = NULL; klass->char_size_changed = NULL; klass->notification_received = NULL; @@ -898,7 +898,7 @@ index 2fe3067d650d..27729dc35db6 100644 klass->shell_preexec = NULL; klass->window_title_changed = NULL; klass->icon_title_changed = NULL; -@@ -1094,6 +1095,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1092,6 +1093,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -965,7 +965,7 @@ index 51ca37bdc748..10b494bddb47 100644 2.30.2 -From 892a472d0accf4457b4e31635b7730dccec66ba7 Mon Sep 17 00:00:00 2001 +From 88a874a95cbc38aa49372f7f05b8f161f6673afa Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 09/11] Test the shell-precmd signal @@ -1002,10 +1002,10 @@ index 3975b9886d77..ff5fb5df052e 100644 { print("[shell] executing command\n"); diff --git a/src/app/app.cc b/src/app/app.cc -index e55f8c1339fa..4dd0fb8dc06b 100644 +index 3caec42e5877..0ae59d2526cb 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1885,6 +1885,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -1888,6 +1888,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -1018,7 +1018,7 @@ index e55f8c1339fa..4dd0fb8dc06b 100644 static void shell_preexec_cb(VteTerminal *terminal) { -@@ -2130,6 +2136,7 @@ vteapp_window_constructed(GObject *object) +@@ -2133,6 +2139,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -1030,7 +1030,7 @@ index e55f8c1339fa..4dd0fb8dc06b 100644 2.30.2 -From d85e9f74c6f506ee7fa168748264e8eccb0727c8 Mon Sep 17 00:00:00 2001 +From d0c13522b182c8dd6397c48e90d03cb2ace9c891 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 10/11] Support tracking the active container inside the @@ -1106,10 +1106,10 @@ index 0b77566ac2f8..540fd25a6866 100644 _VTE_PUBLIC const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 27729dc35db6..37fead40ca0d 100644 +index 4b71437d117c..1446f3c7cc59 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -709,6 +709,12 @@ try +@@ -707,6 +707,12 @@ try case PROP_CURSOR_BLINK_MODE: g_value_set_enum (value, vte_terminal_get_cursor_blink_mode (terminal)); break; @@ -1122,7 +1122,7 @@ index 27729dc35db6..37fead40ca0d 100644 case PROP_CURRENT_DIRECTORY_URI: g_value_set_string (value, vte_terminal_get_current_directory_uri (terminal)); break; -@@ -2101,6 +2107,27 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2099,6 +2105,27 @@ vte_terminal_class_init(VteTerminalClass *klass) NULL, (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -1150,7 +1150,7 @@ index 27729dc35db6..37fead40ca0d 100644 /** * VteTerminal:current-directory-uri: * -@@ -4596,6 +4623,56 @@ catch (...) +@@ -4574,6 +4601,56 @@ catch (...) return -1; } @@ -1380,7 +1380,7 @@ index 10b494bddb47..2a2ba4b47441 100644 2.30.2 -From e902b6ea9a041a468ab47fec20542a8fca3c9e57 Mon Sep 17 00:00:00 2001 +From 63cc3edf8d68328a8d27dc1c6d41337af6921c7a Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region diff --git a/vte291.spec b/vte291.spec index 6547d25..5fc4c0d 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,13 +10,13 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.63.91 +Version: 0.64.0 Release: 1%{?dist} Summary: Terminal emulator library License: LGPLv2+ URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.63/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.64/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -120,6 +120,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Thu May 06 2021 Debarshi Ray - 0.64.0-1 +- Update to 0.64.0 + * Thu May 06 2021 Debarshi Ray - 0.63.91-1 - Update to 0.63.91 - Rebase downstream patches From a7fdde7e675551273a2a3eb09b70b4b30884c9db Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 6 May 2021 17:22:22 +0200 Subject: [PATCH 011/102] Update to 0.64.1 --- .gitignore | 1 + sources | 2 +- vte291-cntnr-precmd-preexec-scroll.patch | 34 ++++++++++++------------ vte291.spec | 5 +++- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index a9f1360..73d6ce5 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,4 @@ /vte-0.62.3.tar.xz /vte-0.63.91.tar.xz /vte-0.64.0.tar.xz +/vte-0.64.1.tar.xz diff --git a/sources b/sources index 5d91078..94b741a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.64.0.tar.xz) = 64c329d192ac4d48676d06a256a72f7e723779800e01c3ae81a0791224d4ca2ed967941d31678d6a97cde90493c3d670cd9f310437523be9e06bab3db72c5399 +SHA512 (vte-0.64.1.tar.xz) = 46a066a73929ba7aa31defc9e2a6e9c531375484a845b9b1e3d9760abd4e5864a66e83b50d72907743fc6afc59c88c4097f433c0b89539f1428be500779350b6 diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index 811eca5..4e0e5fe 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,4 +1,4 @@ -From a0a85edaed44a37c1f35e5cad372ba1dee4f270a Mon Sep 17 00:00:00 2001 +From d0292b797130694621e6af96728c7aa126b40bb9 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 01/11] Add sequences and signals for desktop notification @@ -36,7 +36,7 @@ index 241128c3ccfe..4412cf3d5f5c 100644 VOID:STRING,UINT VOID:UINT,UINT diff --git a/src/vte.cc b/src/vte.cc -index 6f16873b3103..d935379df4d9 100644 +index 4ea466bd9360..033abcfe83cb 100644 --- a/src/vte.cc +++ b/src/vte.cc @@ -10100,6 +10100,14 @@ Terminal::emit_pending_signals() @@ -215,7 +215,7 @@ index bde2fa7ba0ab..7ab65b6d204a 100644 2.30.2 -From 168571d31e16014649f09b972c63ea78755249e0 Mon Sep 17 00:00:00 2001 +From 14ae7496ee64ed6404547eb9407286e61beab2e9 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND @@ -251,7 +251,7 @@ index 3ac99d7ec04f..2c6f668142c3 100644 2.30.2 -From faa8026184179478358fa24fdbc6321a81fbea2b Mon Sep 17 00:00:00 2001 +From b819404f9d677e82f350ce4943e60af142bec07b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 Subject: [PATCH 03/11] Test the notification-received signal @@ -318,7 +318,7 @@ index 37d51c6b8963..73810251a4d0 100644 2.30.2 -From e2de3222438099a4baeea2fc5dd27f0b1e94ed5f Mon Sep 17 00:00:00 2001 +From 3c7a8584beffd867165fed0dfc06728913527aa0 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 Subject: [PATCH 04/11] Add a property to configure the scroll speed @@ -349,7 +349,7 @@ index c69181da7c78..dba88c156fe8 100644 vte_terminal_get_scrollback_lines vte_terminal_set_font diff --git a/src/vte.cc b/src/vte.cc -index d935379df4d9..fee92d68f328 100644 +index 033abcfe83cb..02fe5cbf2df7 100644 --- a/src/vte.cc +++ b/src/vte.cc @@ -9293,6 +9293,7 @@ vte_cairo_get_clip_region (cairo_t *cr) @@ -520,7 +520,7 @@ index 38aaf421ec30..fd1a8b9008cf 100644 2.30.2 -From 91e5010be14c0f85760744c6b3fb356a364eb9fe Mon Sep 17 00:00:00 2001 +From fb3ed87e86488a7b9f224f4bc5d7e1ea76686318 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 Subject: [PATCH 05/11] Test the scroll-speed property @@ -593,7 +593,7 @@ index 73810251a4d0..90421730a66a 100644 2.30.2 -From 999e04a183fff7b25918f7253aaeb200eb00d5e6 Mon Sep 17 00:00:00 2001 +From 0ea61474bc6f47c15d9856fef43ea9c5a5810ae4 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 06/11] Support preexec notifications from an interactive shell @@ -622,7 +622,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index fee92d68f328..481e171fcd0a 100644 +index 02fe5cbf2df7..38a64d17a0bf 100644 --- a/src/vte.cc +++ b/src/vte.cc @@ -10125,6 +10125,12 @@ Terminal::emit_pending_signals() @@ -746,7 +746,7 @@ index 7ab65b6d204a..51ca37bdc748 100644 2.30.2 -From 309fda0ced97797d592f772017570e16ba23ebab Mon Sep 17 00:00:00 2001 +From f3075b837fb363be213067c1eaa37d41ff178b4b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 Subject: [PATCH 07/11] Test the shell-preexec signal @@ -811,7 +811,7 @@ index 90421730a66a..3caec42e5877 100644 2.30.2 -From 75d0ca735a57504824c9e475c81bfb075f4df721 Mon Sep 17 00:00:00 2001 +From 6feda43e7aa751638f0543f0cf68ee002fe17bac Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 08/11] Support precmd notifications from an interactive shell @@ -840,7 +840,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 481e171fcd0a..c57ca3a7fd8c 100644 +index 38a64d17a0bf..6b3e1336ca15 100644 --- a/src/vte.cc +++ b/src/vte.cc @@ -10131,6 +10131,12 @@ Terminal::emit_pending_signals() @@ -965,7 +965,7 @@ index 51ca37bdc748..10b494bddb47 100644 2.30.2 -From 88a874a95cbc38aa49372f7f05b8f161f6673afa Mon Sep 17 00:00:00 2001 +From 484aa4cc8def14f5b920d4e898e577ef9e402765 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 09/11] Test the shell-precmd signal @@ -1030,7 +1030,7 @@ index 3caec42e5877..0ae59d2526cb 100644 2.30.2 -From d0c13522b182c8dd6397c48e90d03cb2ace9c891 Mon Sep 17 00:00:00 2001 +From a9691aa071a9f15c637c249d5d7119092a7cd043 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 10/11] Support tracking the active container inside the @@ -1072,7 +1072,7 @@ agreed upon across multiple different terminal emulators [1]. 6 files changed, 193 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index c57ca3a7fd8c..9f025316d45b 100644 +index 6b3e1336ca15..abd6b449ae48 100644 --- a/src/vte.cc +++ b/src/vte.cc @@ -10150,6 +10150,14 @@ Terminal::emit_pending_signals() @@ -1380,7 +1380,7 @@ index 10b494bddb47..2a2ba4b47441 100644 2.30.2 -From 63cc3edf8d68328a8d27dc1c6d41337af6921c7a Mon Sep 17 00:00:00 2001 +From 9917160afbb918979fa78e4fe1575db350d94386 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region @@ -1396,7 +1396,7 @@ This reverts commit 73713ec0644e232fb740170e399282be778d97f9. 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 9f025316d45b..0a6d0bc4a96e 100644 +index abd6b449ae48..99ad5973c363 100644 --- a/src/vte.cc +++ b/src/vte.cc @@ -6595,10 +6595,7 @@ Terminal::maybe_end_selection() diff --git a/vte291.spec b/vte291.spec index 5fc4c0d..858f96b 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,7 +10,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.64.0 +Version: 0.64.1 Release: 1%{?dist} Summary: Terminal emulator library @@ -120,6 +120,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Thu May 06 2021 Debarshi Ray - 0.64.1-1 +- Update to 0.64.1 + * Thu May 06 2021 Debarshi Ray - 0.64.0-1 - Update to 0.64.0 From fb1f5bcce09805acc7e3b4a1361d6952d117c7dc Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 7 May 2021 22:25:14 +0200 Subject: [PATCH 012/102] Add missing _VTE_CXX_NOEXCEPT in downstream patches Spotted Christian Persch. --- vte291-cntnr-precmd-preexec-scroll.patch | 50 +++++++++++++----------- vte291.spec | 5 ++- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index 4e0e5fe..d615532 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -318,7 +318,7 @@ index 37d51c6b8963..73810251a4d0 100644 2.30.2 -From 3c7a8584beffd867165fed0dfc06728913527aa0 Mon Sep 17 00:00:00 2001 +From 68c344a66996e3845db55994e25413c97a809504 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 Subject: [PATCH 04/11] Add a property to configure the scroll speed @@ -329,12 +329,12 @@ moving the buffer by a function of the number of visible rows. https://bugzilla.redhat.com/show_bug.cgi?id=1103380 --- doc/reference/vte-sections.txt | 1 + - src/vte.cc | 19 +++++++++++++- + src/vte.cc | 19 ++++++++++++- src/vte/vteterminal.h | 4 +++ - src/vtegtk.cc | 45 ++++++++++++++++++++++++++++++++++ + src/vtegtk.cc | 51 ++++++++++++++++++++++++++++++++++ src/vtegtk.hh | 1 + src/vteinternal.hh | 2 ++ - 6 files changed, 71 insertions(+), 1 deletion(-) + 6 files changed, 77 insertions(+), 1 deletion(-) diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt index c69181da7c78..dba88c156fe8 100644 @@ -393,7 +393,7 @@ index 033abcfe83cb..02fe5cbf2df7 100644 Terminal::set_scrollback_lines(long lines) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 668a7dbeae96..ea4fba199a26 100644 +index 668a7dbeae96..0143f0b9dd4d 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -310,6 +310,10 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, @@ -402,13 +402,13 @@ index 668a7dbeae96..ea4fba199a26 100644 +_VTE_PUBLIC +void vte_terminal_set_scroll_speed(VteTerminal *terminal, -+ guint scroll_speed) _VTE_GNUC_NONNULL(1); ++ guint scroll_speed) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); + /* Set the number of scrollback lines, above or at an internal minimum. */ _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 8c31a2895886..c5c8eb2fdc8d 100644 +index 8c31a2895886..d73f1ce05680 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -758,6 +758,9 @@ try @@ -453,7 +453,7 @@ index 8c31a2895886..c5c8eb2fdc8d 100644 /** * VteTerminal:scrollback-lines: * -@@ -5367,6 +5388,30 @@ catch (...) +@@ -5367,6 +5388,36 @@ catch (...) return -1; } @@ -468,7 +468,9 @@ index 8c31a2895886..c5c8eb2fdc8d 100644 + * rows the widget can display. + */ +void -+vte_terminal_set_scroll_speed(VteTerminal *terminal, guint scroll_speed) ++vte_terminal_set_scroll_speed(VteTerminal *terminal, ++ guint scroll_speed) noexcept ++try +{ + g_return_if_fail(VTE_IS_TERMINAL(terminal)); + @@ -480,6 +482,10 @@ index 8c31a2895886..c5c8eb2fdc8d 100644 + + g_object_thaw_notify(object); +} ++catch (...) ++{ ++ vte::log_exception(); ++} + /** * vte_terminal_set_scrollback_lines: @@ -520,7 +526,7 @@ index 38aaf421ec30..fd1a8b9008cf 100644 2.30.2 -From fb3ed87e86488a7b9f224f4bc5d7e1ea76686318 Mon Sep 17 00:00:00 2001 +From cb8b9297bfdf7dd3ff49c01bb9bdfa2122f9ef63 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 Subject: [PATCH 05/11] Test the scroll-speed property @@ -593,7 +599,7 @@ index 73810251a4d0..90421730a66a 100644 2.30.2 -From 0ea61474bc6f47c15d9856fef43ea9c5a5810ae4 Mon Sep 17 00:00:00 2001 +From 9ae40f1485bd6dc4468c59dc6b1474b06053933c Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 06/11] Support preexec notifications from an interactive shell @@ -652,7 +658,7 @@ index 2c6f668142c3..fc33a63f1f84 100644 ;; esac diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index ea4fba199a26..1fb8b061c9e3 100644 +index 0143f0b9dd4d..2d1017f4a216 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -103,9 +103,10 @@ struct _VteTerminalClass { @@ -668,7 +674,7 @@ index ea4fba199a26..1fb8b061c9e3 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index c5c8eb2fdc8d..e2a6462f2b61 100644 +index d73f1ce05680..f78b168a0a7c 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -990,6 +990,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -746,7 +752,7 @@ index 7ab65b6d204a..51ca37bdc748 100644 2.30.2 -From f3075b837fb363be213067c1eaa37d41ff178b4b Mon Sep 17 00:00:00 2001 +From f7b0c02b216b492c928fcb314dcef9a248e6a042 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 Subject: [PATCH 07/11] Test the shell-preexec signal @@ -811,7 +817,7 @@ index 90421730a66a..3caec42e5877 100644 2.30.2 -From 6feda43e7aa751638f0543f0cf68ee002fe17bac Mon Sep 17 00:00:00 2001 +From 63930c9a1e3e8cade091332c0499edf692cc91ae Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 08/11] Support precmd notifications from an interactive shell @@ -870,7 +876,7 @@ index fc33a63f1f84..359afbc4645c 100644 } diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 1fb8b061c9e3..0b77566ac2f8 100644 +index 2d1017f4a216..5e413393f7ec 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -103,10 +103,11 @@ struct _VteTerminalClass { @@ -887,7 +893,7 @@ index 1fb8b061c9e3..0b77566ac2f8 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index e2a6462f2b61..4b71437d117c 100644 +index f78b168a0a7c..bd6c0d7d2777 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -990,6 +990,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -965,7 +971,7 @@ index 51ca37bdc748..10b494bddb47 100644 2.30.2 -From 484aa4cc8def14f5b920d4e898e577ef9e402765 Mon Sep 17 00:00:00 2001 +From 65d93ad126528ad50c652afd7b5ab3dd1cf65dc5 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 09/11] Test the shell-precmd signal @@ -1030,7 +1036,7 @@ index 3caec42e5877..0ae59d2526cb 100644 2.30.2 -From a9691aa071a9f15c637c249d5d7119092a7cd043 Mon Sep 17 00:00:00 2001 +From 1c5cf64a59cf6570af701abeb8b866aac4ed3627 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 10/11] Support tracking the active container inside the @@ -1091,7 +1097,7 @@ index 6b3e1336ca15..abd6b449ae48 100644 if (m_current_directory_uri != m_current_directory_uri_pending) { m_current_directory_uri.swap(m_current_directory_uri_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 0b77566ac2f8..540fd25a6866 100644 +index 5e413393f7ec..32b2f32eef9d 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -488,6 +488,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT @@ -1106,7 +1112,7 @@ index 0b77566ac2f8..540fd25a6866 100644 _VTE_PUBLIC const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 4b71437d117c..1446f3c7cc59 100644 +index bd6c0d7d2777..ec4322d980c4 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -707,6 +707,12 @@ try @@ -1380,7 +1386,7 @@ index 10b494bddb47..2a2ba4b47441 100644 2.30.2 -From 9917160afbb918979fa78e4fe1575db350d94386 Mon Sep 17 00:00:00 2001 +From 19e61e25e05e1c7ee7b8b8bc586af40fc5d8cc9d Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region diff --git a/vte291.spec b/vte291.spec index 858f96b..4e7baf6 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.64.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Terminal emulator library License: LGPLv2+ @@ -120,6 +120,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Fri May 07 2021 Debarshi Ray - 0.64.1-2 +- Add missing _VTE_CXX_NOEXCEPT in downstream patches + * Thu May 06 2021 Debarshi Ray - 0.64.1-1 - Update to 0.64.1 From 60a67bf28777eb469ff475d64fe280712b048db6 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Thu, 20 May 2021 01:22:42 +0100 Subject: [PATCH 013/102] Rebuild for ICU 69 --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 4e7baf6..4a860ab 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.64.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Terminal emulator library License: LGPLv2+ @@ -120,6 +120,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Thu May 20 2021 Pete Walter - 0.64.1-3 +- Rebuild for ICU 69 + * Fri May 07 2021 Debarshi Ray - 0.64.1-2 - Add missing _VTE_CXX_NOEXCEPT in downstream patches From d2277d0702dcc901aaeb23b7c04512d4a1424575 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 16 Jun 2021 20:58:56 +0200 Subject: [PATCH 014/102] Update to 0.64.2 --- .gitignore | 1 + sources | 2 +- vte291-cntnr-precmd-preexec-scroll.patch | 54 ++++++++++++------------ vte291.spec | 7 ++- 4 files changed, 34 insertions(+), 30 deletions(-) diff --git a/.gitignore b/.gitignore index 73d6ce5..680eb63 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,4 @@ /vte-0.63.91.tar.xz /vte-0.64.0.tar.xz /vte-0.64.1.tar.xz +/vte-0.64.2.tar.xz diff --git a/sources b/sources index 94b741a..d1982ea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.64.1.tar.xz) = 46a066a73929ba7aa31defc9e2a6e9c531375484a845b9b1e3d9760abd4e5864a66e83b50d72907743fc6afc59c88c4097f433c0b89539f1428be500779350b6 +SHA512 (vte-0.64.2.tar.xz) = 67facea1f2507183aa5fd51215a404d6e754be5694e49c8511d7dd841192178a583e9416b2611dc6b5f635555ac2fb9f48a8a6e68e6e4673c4d93422b7555061 diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index d615532..26a51e6 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,4 +1,4 @@ -From d0292b797130694621e6af96728c7aa126b40bb9 Mon Sep 17 00:00:00 2001 +From b0b746ddf50375173d0b98baf12740dc910745d2 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 01/11] Add sequences and signals for desktop notification @@ -71,7 +71,7 @@ index e705ece69ad6..668a7dbeae96 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 0a26f976649b..8c31a2895886 100644 +index c68a0f1ac388..e3274ff3df90 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -983,6 +983,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -212,10 +212,10 @@ index bde2fa7ba0ab..7ab65b6d204a 100644 default: break; -- -2.30.2 +2.31.1 -From 14ae7496ee64ed6404547eb9407286e61beab2e9 Mon Sep 17 00:00:00 2001 +From f1ba75377276560079af1d8f615380abd5fc9438 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND @@ -248,10 +248,10 @@ index 3ac99d7ec04f..2c6f668142c3 100644 } -- -2.30.2 +2.31.1 -From b819404f9d677e82f350ce4943e60af142bec07b Mon Sep 17 00:00:00 2001 +From 5c825104d44100b72d98cf02ea0751065576af4e Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 Subject: [PATCH 03/11] Test the notification-received signal @@ -315,10 +315,10 @@ index 37d51c6b8963..73810251a4d0 100644 if (options.no_double_buffer) { G_GNUC_BEGIN_IGNORE_DEPRECATIONS; -- -2.30.2 +2.31.1 -From 68c344a66996e3845db55994e25413c97a809504 Mon Sep 17 00:00:00 2001 +From aa647920fe6dc8ee0f4d23d8d90bafc649d01efe Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 Subject: [PATCH 04/11] Add a property to configure the scroll speed @@ -408,7 +408,7 @@ index 668a7dbeae96..0143f0b9dd4d 100644 _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 8c31a2895886..d73f1ce05680 100644 +index e3274ff3df90..b4bcd3d9a1d5 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -758,6 +758,9 @@ try @@ -523,10 +523,10 @@ index 38aaf421ec30..fd1a8b9008cf 100644 bool set_fallback_scrolling(bool set); auto fallback_scrolling() const noexcept { return m_fallback_scrolling; } -- -2.30.2 +2.31.1 -From cb8b9297bfdf7dd3ff49c01bb9bdfa2122f9ef63 Mon Sep 17 00:00:00 2001 +From f080a7417f8f657778916219ad06ab184c53ff9a Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 Subject: [PATCH 05/11] Test the scroll-speed property @@ -596,10 +596,10 @@ index 73810251a4d0..90421730a66a 100644 vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); -- -2.30.2 +2.31.1 -From 9ae40f1485bd6dc4468c59dc6b1474b06053933c Mon Sep 17 00:00:00 2001 +From b77827bf39fcf7b27f548a5472802371196801d3 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 06/11] Support preexec notifications from an interactive shell @@ -674,7 +674,7 @@ index 0143f0b9dd4d..2d1017f4a216 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index d73f1ce05680..f78b168a0a7c 100644 +index b4bcd3d9a1d5..ce95126b37b8 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -990,6 +990,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -749,10 +749,10 @@ index 7ab65b6d204a..51ca37bdc748 100644 bool -- -2.30.2 +2.31.1 -From f7b0c02b216b492c928fcb314dcef9a248e6a042 Mon Sep 17 00:00:00 2001 +From d2e780db838ead280cf5657c49b0d63dd0683f5f Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 Subject: [PATCH 07/11] Test the shell-preexec signal @@ -814,10 +814,10 @@ index 90421730a66a..3caec42e5877 100644 /* Settings */ if (options.no_double_buffer) { -- -2.30.2 +2.31.1 -From 63930c9a1e3e8cade091332c0499edf692cc91ae Mon Sep 17 00:00:00 2001 +From 949d4552c4ab66e02ba03024091f21bd35c199d8 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 08/11] Support precmd notifications from an interactive shell @@ -893,7 +893,7 @@ index 2d1017f4a216..5e413393f7ec 100644 VteTerminalClassPrivate *priv; }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index f78b168a0a7c..bd6c0d7d2777 100644 +index ce95126b37b8..a84f17e21f65 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -990,6 +990,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -968,10 +968,10 @@ index 51ca37bdc748..10b494bddb47 100644 } } -- -2.30.2 +2.31.1 -From 65d93ad126528ad50c652afd7b5ab3dd1cf65dc5 Mon Sep 17 00:00:00 2001 +From 28518832a97fc3ff2760de36cc13586c12555b62 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 09/11] Test the shell-precmd signal @@ -1033,10 +1033,10 @@ index 3caec42e5877..0ae59d2526cb 100644 /* Settings */ -- -2.30.2 +2.31.1 -From 1c5cf64a59cf6570af701abeb8b866aac4ed3627 Mon Sep 17 00:00:00 2001 +From e1c687e0651c06b72c7197e9f8f4a91122e8451c Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 10/11] Support tracking the active container inside the @@ -1112,7 +1112,7 @@ index 5e413393f7ec..32b2f32eef9d 100644 _VTE_PUBLIC const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index bd6c0d7d2777..ec4322d980c4 100644 +index a84f17e21f65..aa3f04c6a02a 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -707,6 +707,12 @@ try @@ -1383,10 +1383,10 @@ index 10b494bddb47..2a2ba4b47441 100644 ++token; -- -2.30.2 +2.31.1 -From 19e61e25e05e1c7ee7b8b8bc586af40fc5d8cc9d Mon Sep 17 00:00:00 2001 +From 4a949461c975c2d062703e161f337d84f13a60d7 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region @@ -1429,5 +1429,5 @@ index abd6b449ae48..99ad5973c363 100644 _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); -- -2.30.2 +2.31.1 diff --git a/vte291.spec b/vte291.spec index 4a860ab..c7d7baf 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,8 +10,8 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.64.1 -Release: 3%{?dist} +Version: 0.64.2 +Release: 1%{?dist} Summary: Terminal emulator library License: LGPLv2+ @@ -120,6 +120,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Jun 16 2021 Debarshi Ray - 0.64.2-1 +- Update to 0.64.2 + * Thu May 20 2021 Pete Walter - 0.64.1-3 - Rebuild for ICU 69 From b98cc3691fdad7c746714ca8237d786d8de3d434 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 17 Jun 2021 17:02:11 +0200 Subject: [PATCH 015/102] Fix the License fields and ship the correct license texts See: https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ --- vte291.spec | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/vte291.spec b/vte291.spec index c7d7baf..696818e 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,10 +11,12 @@ Name: vte291 Version: 0.64.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Terminal emulator library -License: LGPLv2+ +# libvte-2.91.so is generated from LGPLv2+ and MIT sources +License: LGPLv3+ and MIT + URL: https://wiki.gnome.org/Apps/Terminal/VTE Source0: https://download.gnome.org/sources/vte/0.64/vte-%{version}.tar.xz @@ -61,6 +63,11 @@ console/terminal in games, editors, IDEs, etc. %package devel Summary: Development files for %{name} + +# vte-2.91 is generated from GPLv3+ sources, while the public headers are +# LGPLv3+ +License: GPLv3+ and LGPLv3+ + Requires: %{name}%{?_isa} = %{version}-%{release} %description devel @@ -99,12 +106,14 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %find_lang vte-%{apiver} %files -f vte-%{apiver}.lang -%license COPYING.GPL3 +%license COPYING.LGPL3 +%license COPYING.XTERM %{_libdir}/libvte-%{apiver}.so.0* %{_libdir}/girepository-1.0/ %{_userunitdir}/vte-spawn-.scope.d %files devel +%license COPYING.GPL3 %{_bindir}/vte-%{apiver} %{_includedir}/vte-%{apiver}/ %{_libdir}/libvte-%{apiver}.so @@ -115,11 +124,15 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_datadir}/vala/ %files -n vte-profile +%license COPYING.GPL3 %{_libexecdir}/vte-urlencode-cwd %{_sysconfdir}/profile.d/vte.csh %{_sysconfdir}/profile.d/vte.sh %changelog +* Thu Jun 17 2021 Debarshi Ray - 0.64.2-2 +- Fix the License fields and ship the correct license texts + * Wed Jun 16 2021 Debarshi Ray - 0.64.2-1 - Update to 0.64.2 From 06ce3617616e689fa01f33c1bf0b3e9d906f8972 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 20:41:39 +0000 Subject: [PATCH 016/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 696818e..798446c 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.64.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -130,6 +130,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 0.64.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Jun 17 2021 Debarshi Ray - 0.64.2-2 - Fix the License fields and ship the correct license texts From daec9cae9f51c723ffc7cd35ae3a3a01bf25c86a Mon Sep 17 00:00:00 2001 From: David King Date: Tue, 28 Sep 2021 14:24:46 +0100 Subject: [PATCH 017/102] Update to 0.66.0 --- .gitignore | 2 + sources | 2 +- vte-0.66.0-prompt-command.patch | 29 ++ vte291-cntnr-precmd-preexec-scroll.patch | 327 ++++++++++++----------- vte291.spec | 27 +- 5 files changed, 213 insertions(+), 174 deletions(-) create mode 100644 vte-0.66.0-prompt-command.patch diff --git a/.gitignore b/.gitignore index 680eb63..3c76eb9 100644 --- a/.gitignore +++ b/.gitignore @@ -76,3 +76,5 @@ /vte-0.64.0.tar.xz /vte-0.64.1.tar.xz /vte-0.64.2.tar.xz +/vte-0.65.91.tar.bz2 +/vte-0.66.0.tar.bz2 diff --git a/sources b/sources index d1982ea..ff827da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.64.2.tar.xz) = 67facea1f2507183aa5fd51215a404d6e754be5694e49c8511d7dd841192178a583e9416b2611dc6b5f635555ac2fb9f48a8a6e68e6e4673c4d93422b7555061 +SHA512 (vte-0.66.0.tar.bz2) = 8868b27cb91d57ba00c3c5261a42054abb352663cb183053917c543c90a8940bfc289ac751858218673b4eecfb6e9706e397a065045646ffeda69e0f3e4f839a diff --git a/vte-0.66.0-prompt-command.patch b/vte-0.66.0-prompt-command.patch new file mode 100644 index 0000000..b36e110 --- /dev/null +++ b/vte-0.66.0-prompt-command.patch @@ -0,0 +1,29 @@ +From 1fe2f3e9e11d1b8b0e45698a268b77e8f52e25db Mon Sep 17 00:00:00 2001 +From: Christian Persch +Date: Sat, 25 Sep 2021 10:50:29 +0200 +Subject: [PATCH] vte.sh: Fix the check for PROMPT_COMMAND when it is unset + +declare "helpfully" outputs on stdout for existing variables, but on stderr +for nonexistent ones. + +Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/37 +--- + src/vte.sh.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vte.sh.in b/src/vte.sh.in +index 1aa40ba4..242d6c42 100644 +--- a/src/vte.sh.in ++++ b/src/vte.sh.in +@@ -48,7 +48,7 @@ if [[ -n "${BASH_VERSION:-}" ]]; then + # On older bash, we can only overwrite the whole PROMPT_COMMAND, so must + # use the __vte_prompt_command function which also sets the title. + +- if [[ "$(declare -p PROMPT_COMMAND)" =~ "declare -a" ]]; then ++ if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then + PROMPT_COMMAND+=(__vte_osc7) + else + PROMPT_COMMAND="__vte_prompt_command" +-- +2.32.0 + diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index 26a51e6..3148bda 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,4 +1,4 @@ -From b0b746ddf50375173d0b98baf12740dc910745d2 Mon Sep 17 00:00:00 2001 +From faa4340a6dc1df505d331eda732c094645bd3863 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 01/11] Add sequences and signals for desktop notification @@ -27,7 +27,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711059 7 files changed, 73 insertions(+), 2 deletions(-) diff --git a/src/marshal.list b/src/marshal.list -index 241128c3ccfe..4412cf3d5f5c 100644 +index 241128c3..4412cf3d 100644 --- a/src/marshal.list +++ b/src/marshal.list @@ -1,3 +1,4 @@ @@ -36,10 +36,10 @@ index 241128c3ccfe..4412cf3d5f5c 100644 VOID:STRING,UINT VOID:UINT,UINT diff --git a/src/vte.cc b/src/vte.cc -index 4ea466bd9360..033abcfe83cb 100644 +index ec330490..f39578ac 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10100,6 +10100,14 @@ Terminal::emit_pending_signals() +@@ -10082,6 +10082,14 @@ Terminal::emit_pending_signals() emit_adjustment_changed(); @@ -55,10 +55,10 @@ index 4ea466bd9360..033abcfe83cb 100644 if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index e705ece69ad6..668a7dbeae96 100644 +index 05f6674f..0b9b8dc4 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -102,8 +102,10 @@ struct _VteTerminalClass { +@@ -109,8 +109,10 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); @@ -68,13 +68,13 @@ index e705ece69ad6..668a7dbeae96 100644 - gpointer padding[16]; + gpointer padding[15]; + // FIXMEgtk4 use class private data instead VteTerminalClassPrivate *priv; - }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index c68a0f1ac388..e3274ff3df90 100644 +index 000be62d..04eceea1 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -983,6 +983,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1242,6 +1242,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->child_exited = NULL; klass->encoding_changed = NULL; klass->char_size_changed = NULL; @@ -82,7 +82,7 @@ index c68a0f1ac388..e3274ff3df90 100644 klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1064,6 +1065,26 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1325,6 +1326,26 @@ vte_terminal_class_init(VteTerminalClass *klass) G_OBJECT_CLASS_TYPE(klass), g_cclosure_marshal_VOID__INTv); @@ -110,22 +110,22 @@ index c68a0f1ac388..e3274ff3df90 100644 * VteTerminal::window-title-changed: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 1cb8cb49967b..389b86d2e557 100644 +index 6b7a1ea2..8ba10395 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -56,6 +56,7 @@ enum { - SIGNAL_TEXT_INSERTED, - SIGNAL_TEXT_MODIFIED, - SIGNAL_TEXT_SCROLLED, +@@ -52,6 +52,7 @@ enum { + SIGNAL_RESIZE_WINDOW, + SIGNAL_RESTORE_WINDOW, + SIGNAL_SELECTION_CHANGED, + SIGNAL_NOTIFICATION_RECEIVED, SIGNAL_WINDOW_TITLE_CHANGED, LAST_SIGNAL }; diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 7a257afed861..38aaf421ec30 100644 +index 77843507..b4dfb2a4 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -621,6 +621,10 @@ public: +@@ -663,6 +663,10 @@ public: gboolean m_cursor_moved_pending; gboolean m_contents_changed_pending; @@ -136,7 +136,7 @@ index 7a257afed861..38aaf421ec30 100644 std::string m_window_title{}; std::string m_current_directory_uri{}; std::string m_current_file_uri{}; -@@ -634,6 +638,7 @@ public: +@@ -676,6 +680,7 @@ public: TITLE = 1u << 0, CWD = 1u << 1, CWF = 1u << 2, @@ -144,7 +144,7 @@ index 7a257afed861..38aaf421ec30 100644 }; unsigned m_pending_changes{0}; -@@ -1358,6 +1363,9 @@ public: +@@ -1488,6 +1493,9 @@ public: int osc) noexcept; /* OSC handlers */ @@ -155,10 +155,10 @@ index 7a257afed861..38aaf421ec30 100644 vte::parser::StringTokeniser::const_iterator& token, vte::parser::StringTokeniser::const_iterator const& endtoken, diff --git a/src/vteseq.cc b/src/vteseq.cc -index bde2fa7ba0ab..7ab65b6d204a 100644 +index 0a45c9b4..1a6bdc11 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1377,6 +1377,33 @@ Terminal::delete_lines(vte::grid::row_t param) +@@ -1376,6 +1376,33 @@ Terminal::delete_lines(vte::grid::row_t param) m_text_deleted_flag = TRUE; } @@ -192,7 +192,7 @@ index bde2fa7ba0ab..7ab65b6d204a 100644 bool Terminal::get_osc_color_index(int osc, int value, -@@ -6519,6 +6546,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6535,6 +6562,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE); break; @@ -203,7 +203,7 @@ index bde2fa7ba0ab..7ab65b6d204a 100644 case VTE_OSC_XTERM_SET_ICON_TITLE: case VTE_OSC_XTERM_SET_XPROPERTY: case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG: -@@ -6559,7 +6590,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6576,7 +6607,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC: case VTE_OSC_URXVT_VIEW_UP: case VTE_OSC_URXVT_VIEW_DOWN: @@ -212,10 +212,10 @@ index bde2fa7ba0ab..7ab65b6d204a 100644 default: break; -- -2.31.1 +2.32.0 -From f1ba75377276560079af1d8f615380abd5fc9438 Mon Sep 17 00:00:00 2001 +From 08aaeb7060411e91f142f928950d01af121e823a Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND @@ -230,10 +230,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711059 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vte.sh.in b/src/vte.sh.in -index 3ac99d7ec04f..2c6f668142c3 100644 +index 242d6c42..50242223 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in -@@ -27,10 +27,12 @@ __vte_osc7 () { +@@ -33,10 +33,12 @@ __vte_osc7 () { } __vte_prompt_command() { @@ -248,10 +248,10 @@ index 3ac99d7ec04f..2c6f668142c3 100644 } -- -2.31.1 +2.32.0 -From 5c825104d44100b72d98cf02ea0751065576af4e Mon Sep 17 00:00:00 2001 +From 1f3aa3194edb4d98ff83836e2f9151960314c040 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 Subject: [PATCH 03/11] Test the notification-received signal @@ -262,7 +262,7 @@ Subject: [PATCH 03/11] Test the notification-received signal 2 files changed, 17 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 8ab27e5aaf9a..025f971b2eb0 100644 +index 8ab27e5a..025f971b 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -309,6 +309,8 @@ class Window : Gtk.ApplicationWindow @@ -287,11 +287,11 @@ index 8ab27e5aaf9a..025f971b2eb0 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index 37d51c6b8963..73810251a4d0 100644 +index 86135abe..e5f67cd9 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1877,6 +1877,14 @@ window_window_title_changed_cb(VteTerminal* terminal, - vte_terminal_get_window_title(window->terminal)); +@@ -2208,6 +2208,14 @@ window_window_title_changed_cb(VteTerminal* terminal, + #endif } +static void @@ -305,20 +305,20 @@ index 37d51c6b8963..73810251a4d0 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2115,6 +2123,8 @@ vteapp_window_constructed(GObject *object) +@@ -2503,6 +2511,8 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); + g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); + /* Settings */ + #if VTE_GTK == 3 if (options.no_double_buffer) { - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; -- -2.31.1 +2.32.0 -From aa647920fe6dc8ee0f4d23d8d90bafc649d01efe Mon Sep 17 00:00:00 2001 +From 67f64a50e3671e50e6cf82f7f69ed1543253a019 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 Subject: [PATCH 04/11] Add a property to configure the scroll speed @@ -328,19 +328,19 @@ moving the buffer by a function of the number of visible rows. https://bugzilla.redhat.com/show_bug.cgi?id=1103380 --- - doc/reference/vte-sections.txt | 1 + - src/vte.cc | 19 ++++++++++++- - src/vte/vteterminal.h | 4 +++ - src/vtegtk.cc | 51 ++++++++++++++++++++++++++++++++++ - src/vtegtk.hh | 1 + - src/vteinternal.hh | 2 ++ + doc/reference/vte-sections.txt.in | 1 + + src/vte.cc | 19 +++++++++++- + src/vte/vteterminal.h | 4 +++ + src/vtegtk.cc | 51 +++++++++++++++++++++++++++++++ + src/vtegtk.hh | 1 + + src/vteinternal.hh | 2 ++ 6 files changed, 77 insertions(+), 1 deletion(-) -diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt -index c69181da7c78..dba88c156fe8 100644 ---- a/doc/reference/vte-sections.txt -+++ b/doc/reference/vte-sections.txt -@@ -54,6 +54,7 @@ vte_terminal_get_cursor_blink_mode +diff --git a/doc/reference/vte-sections.txt.in b/doc/reference/vte-sections.txt.in +index 1180f972..f097d4b9 100644 +--- a/doc/reference/vte-sections.txt.in ++++ b/doc/reference/vte-sections.txt.in +@@ -56,6 +56,7 @@ vte_terminal_get_cursor_blink_mode vte_terminal_set_cursor_blink_mode vte_terminal_get_text_blink_mode vte_terminal_set_text_blink_mode @@ -349,10 +349,10 @@ index c69181da7c78..dba88c156fe8 100644 vte_terminal_get_scrollback_lines vte_terminal_set_font diff --git a/src/vte.cc b/src/vte.cc -index 033abcfe83cb..02fe5cbf2df7 100644 +index f39578ac..f027ce3b 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -9293,6 +9293,7 @@ vte_cairo_get_clip_region (cairo_t *cr) +@@ -9289,6 +9289,7 @@ vte_cairo_get_clip_region(cairo_t *cr) bool Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) { @@ -360,13 +360,13 @@ index 033abcfe83cb..02fe5cbf2df7 100644 gdouble v; gint cnt, i; int button; -@@ -9327,7 +9328,13 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) +@@ -9323,7 +9324,13 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) return true; } -- v = MAX (1., ceil (gtk_adjustment_get_page_increment (m_vadjustment.get()) / 10.)); +- v = MAX (1., ceil (m_row_count /* page increment */ / 10.)); + if (m_scroll_speed == 0) { -+ scroll_speed = ceil (gtk_adjustment_get_page_increment (m_vadjustment.get()) / 10.); ++ scroll_speed = ceil (m_row_count /* page increment */ / 10.); + } else { + scroll_speed = m_scroll_speed; + } @@ -375,7 +375,7 @@ index 033abcfe83cb..02fe5cbf2df7 100644 _vte_debug_print(VTE_DEBUG_EVENTS, "Scroll speed is %d lines per non-smooth scroll unit\n", (int) v); -@@ -9641,6 +9648,16 @@ Terminal::decscusr_cursor_shape() const noexcept +@@ -9633,6 +9640,16 @@ Terminal::decscusr_cursor_shape() const noexcept } } @@ -393,10 +393,10 @@ index 033abcfe83cb..02fe5cbf2df7 100644 Terminal::set_scrollback_lines(long lines) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 668a7dbeae96..0143f0b9dd4d 100644 +index 0b9b8dc4..20c930f7 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -310,6 +310,10 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, +@@ -324,6 +324,10 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, _VTE_PUBLIC VteCursorShape vte_terminal_get_cursor_shape(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); @@ -408,10 +408,10 @@ index 668a7dbeae96..0143f0b9dd4d 100644 _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index e3274ff3df90..b4bcd3d9a1d5 100644 +index 04eceea1..7e405a39 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -758,6 +758,9 @@ try +@@ -993,6 +993,9 @@ try case PROP_REWRAP_ON_RESIZE: g_value_set_boolean (value, vte_terminal_get_rewrap_on_resize (terminal)); break; @@ -421,7 +421,7 @@ index e3274ff3df90..b4bcd3d9a1d5 100644 case PROP_SCROLLBACK_LINES: g_value_set_uint (value, vte_terminal_get_scrollback_lines(terminal)); break; -@@ -876,6 +879,9 @@ try +@@ -1114,6 +1117,9 @@ try case PROP_REWRAP_ON_RESIZE: vte_terminal_set_rewrap_on_resize (terminal, g_value_get_boolean (value)); break; @@ -431,7 +431,7 @@ index e3274ff3df90..b4bcd3d9a1d5 100644 case PROP_SCROLLBACK_LINES: vte_terminal_set_scrollback_lines (terminal, g_value_get_uint (value)); break; -@@ -1966,6 +1972,21 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2210,6 +2216,21 @@ vte_terminal_class_init(VteTerminalClass *klass) TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -453,7 +453,7 @@ index e3274ff3df90..b4bcd3d9a1d5 100644 /** * VteTerminal:scrollback-lines: * -@@ -5367,6 +5388,36 @@ catch (...) +@@ -5666,6 +5687,36 @@ catch (...) return -1; } @@ -491,10 +491,10 @@ index e3274ff3df90..b4bcd3d9a1d5 100644 * vte_terminal_set_scrollback_lines: * @terminal: a #VteTerminal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 389b86d2e557..24063c3060da 100644 +index 8ba10395..f6cd891b 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -90,6 +90,7 @@ enum { +@@ -86,6 +86,7 @@ enum { PROP_MOUSE_POINTER_AUTOHIDE, PROP_PTY, PROP_REWRAP_ON_RESIZE, @@ -503,18 +503,18 @@ index 389b86d2e557..24063c3060da 100644 PROP_SCROLL_ON_KEYSTROKE, PROP_SCROLL_ON_OUTPUT, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 38aaf421ec30..fd1a8b9008cf 100644 +index b4dfb2a4..2da56ebd 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -399,6 +399,7 @@ public: +@@ -429,6 +429,7 @@ public: bool m_fallback_scrolling{true}; bool m_scroll_on_output{false}; bool m_scroll_on_keystroke{true}; + guint m_scroll_speed; vte::grid::row_t m_scrollback_lines{0}; - /* Restricted scrolling */ -@@ -1232,6 +1233,7 @@ public: + inline auto scroll_limit_lower() const noexcept +@@ -1363,6 +1364,7 @@ public: bool set_input_enabled(bool enabled); bool set_mouse_autohide(bool autohide); bool set_rewrap_on_resize(bool rewrap); @@ -523,10 +523,10 @@ index 38aaf421ec30..fd1a8b9008cf 100644 bool set_fallback_scrolling(bool set); auto fallback_scrolling() const noexcept { return m_fallback_scrolling; } -- -2.31.1 +2.32.0 -From f080a7417f8f657778916219ad06ab184c53ff9a Mon Sep 17 00:00:00 2001 +From 7c7ab09278605488a2710eac246842d646e0cfc7 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 Subject: [PATCH 05/11] Test the scroll-speed property @@ -538,7 +538,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1103380 2 files changed, 8 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 025f971b2eb0..51b5d6410503 100644 +index 025f971b..51b5d641 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -335,6 +335,7 @@ class Window : Gtk.ApplicationWindow @@ -567,10 +567,10 @@ index 025f971b2eb0..51b5d6410503 100644 "Specify the number of scrollback-lines", null }, { "transparent", 'T', 0, OptionArg.INT, ref transparency_percent, diff --git a/src/app/app.cc b/src/app/app.cc -index 73810251a4d0..90421730a66a 100644 +index e5f67cd9..e812416c 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -116,6 +116,7 @@ public: +@@ -115,6 +115,7 @@ public: int verbosity{0}; double cell_height_scale{1.0}; double cell_width_scale{1.0}; @@ -578,28 +578,28 @@ index 73810251a4d0..90421730a66a 100644 VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM}; VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK}; VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS}; -@@ -590,6 +591,8 @@ public: +@@ -617,6 +618,8 @@ public: "Reverse foreground/background colors", nullptr }, { "require-systemd-scope", 0, 0, G_OPTION_ARG_NONE, &require_systemd_scope, "Require use of a systemd user scope", nullptr }, + { "scroll-speed", 0, 0, G_OPTION_ARG_INT, &scroll_speed, + "Specify the scroll speed", nullptr }, + { "scroll-unit-is-pixels", 0, 0, G_OPTION_ARG_NONE, &scroll_unit_is_pixels, + "Use pixels as scroll unit", nullptr }, { "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines, - "Specify the number of scrollback-lines (-1 for infinite)", nullptr }, - { "transparent", 'T', 0, G_OPTION_ARG_INT, &transparency_percent, -@@ -2157,6 +2160,7 @@ vteapp_window_constructed(GObject *object) +@@ -2547,6 +2550,7 @@ vteapp_window_constructed(GObject *object) vte_terminal_set_rewrap_on_resize(window->terminal, !options.no_rewrap); vte_terminal_set_scroll_on_output(window->terminal, false); vte_terminal_set_scroll_on_keystroke(window->terminal, true); + vte_terminal_set_scroll_speed(window->terminal, options.scroll_speed); + vte_terminal_set_scroll_unit_is_pixels(window->terminal, options.scroll_unit_is_pixels); vte_terminal_set_scrollback_lines(window->terminal, options.scrollback_lines); vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); - -- -2.31.1 +2.32.0 -From b77827bf39fcf7b27f548a5472802371196801d3 Mon Sep 17 00:00:00 2001 +From fb7db8f86848dc7ad6ea585d3211e935603d1aa9 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 06/11] Support preexec notifications from an interactive shell @@ -619,19 +619,19 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 --- src/vte.cc | 6 ++++++ - src/vte.sh.in | 2 +- + src/vte.sh.in | 4 ++-- src/vte/vteterminal.h | 3 ++- src/vtegtk.cc | 18 ++++++++++++++++++ src/vtegtk.hh | 1 + src/vteinternal.hh | 1 + src/vteseq.cc | 4 ++++ - 7 files changed, 33 insertions(+), 2 deletions(-) + 7 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 02fe5cbf2df7..38a64d17a0bf 100644 +index f027ce3b..36cf379f 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10125,6 +10125,12 @@ Terminal::emit_pending_signals() +@@ -10107,6 +10107,12 @@ Terminal::emit_pending_signals() m_notification_body.c_str()); } @@ -645,23 +645,26 @@ index 02fe5cbf2df7..38a64d17a0bf 100644 if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte.sh.in b/src/vte.sh.in -index 2c6f668142c3..fc33a63f1f84 100644 +index 50242223..01b44e23 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in -@@ -38,7 +38,7 @@ __vte_prompt_command() { +@@ -51,9 +51,9 @@ if [[ -n "${BASH_VERSION:-}" ]]; then + # use the __vte_prompt_command function which also sets the title. - case "$TERM" in - xterm*|vte*) -- [ -n "${BASH_VERSION:-}" ] && PROMPT_COMMAND="__vte_prompt_command" -+ [ -n "${BASH_VERSION:-}" ] && PROMPT_COMMAND="__vte_prompt_command" && PS0=$(printf "\033]777;preexec\033\\") - [ -n "${ZSH_VERSION:-}" ] && precmd_functions+=(__vte_osc7) - ;; - esac + if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then +- PROMPT_COMMAND+=(__vte_osc7) ++ PROMPT_COMMAND+=(__vte_osc7) && PS0=$(printf "\033]777;preexec\033\\") + else +- PROMPT_COMMAND="__vte_prompt_command" ++ PROMPT_COMMAND="__vte_prompt_command" && PS0=$(printf "\033]777;preexec\033\\") + fi + + elif [[ -n "${ZSH_VERSION:-}" ]]; then diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 0143f0b9dd4d..2d1017f4a216 100644 +index 20c930f7..2b277e05 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -103,9 +103,10 @@ struct _VteTerminalClass { +@@ -110,9 +110,10 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); @@ -671,13 +674,13 @@ index 0143f0b9dd4d..2d1017f4a216 100644 - gpointer padding[15]; + gpointer padding[14]; + // FIXMEgtk4 use class private data instead VteTerminalClassPrivate *priv; - }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index b4bcd3d9a1d5..ce95126b37b8 100644 +index 7e405a39..22b6412b 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -990,6 +990,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1249,6 +1249,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->encoding_changed = NULL; klass->char_size_changed = NULL; klass->notification_received = NULL; @@ -685,7 +688,7 @@ index b4bcd3d9a1d5..ce95126b37b8 100644 klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1091,6 +1092,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1352,6 +1353,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -710,7 +713,7 @@ index b4bcd3d9a1d5..ce95126b37b8 100644 * VteTerminal::window-title-changed: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 24063c3060da..e90e183e7c2d 100644 +index f6cd891b..bf85bdf4 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -52,6 +52,7 @@ enum { @@ -718,14 +721,14 @@ index 24063c3060da..e90e183e7c2d 100644 SIGNAL_RESTORE_WINDOW, SIGNAL_SELECTION_CHANGED, + SIGNAL_SHELL_PREEXEC, - SIGNAL_TEXT_DELETED, - SIGNAL_TEXT_INSERTED, - SIGNAL_TEXT_MODIFIED, + SIGNAL_NOTIFICATION_RECEIVED, + SIGNAL_WINDOW_TITLE_CHANGED, + LAST_SIGNAL diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index fd1a8b9008cf..bb98f8bc0903 100644 +index 2da56ebd..041a9a81 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -640,6 +640,7 @@ public: +@@ -682,6 +682,7 @@ public: CWD = 1u << 1, CWF = 1u << 2, NOTIFICATION = 1u << 3, @@ -734,10 +737,10 @@ index fd1a8b9008cf..bb98f8bc0903 100644 unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index 7ab65b6d204a..51ca37bdc748 100644 +index 1a6bdc11..84341cda 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1402,6 +1402,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1401,6 +1401,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, m_notification_body = *token; return; } @@ -749,10 +752,10 @@ index 7ab65b6d204a..51ca37bdc748 100644 bool -- -2.31.1 +2.32.0 -From d2e780db838ead280cf5657c49b0d63dd0683f5f Mon Sep 17 00:00:00 2001 +From 4a699bf2ff119c9267faeac81b4db9421b782837 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 Subject: [PATCH 07/11] Test the shell-preexec signal @@ -765,7 +768,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 2 files changed, 13 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 51b5d6410503..3975b9886d77 100644 +index 51b5d641..3975b988 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -310,6 +310,7 @@ class Window : Gtk.ApplicationWindow @@ -789,10 +792,10 @@ index 51b5d6410503..3975b9886d77 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index 90421730a66a..3caec42e5877 100644 +index e812416c..498db5a4 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1888,6 +1888,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2219,6 +2219,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -805,19 +808,19 @@ index 90421730a66a..3caec42e5877 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2127,6 +2133,7 @@ vteapp_window_constructed(GObject *object) +@@ -2515,6 +2521,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); + g_signal_connect(window->terminal, "shell-preexec", G_CALLBACK(shell_preexec_cb), NULL); /* Settings */ - if (options.no_double_buffer) { + #if VTE_GTK == 3 -- -2.31.1 +2.32.0 -From 949d4552c4ab66e02ba03024091f21bd35c199d8 Mon Sep 17 00:00:00 2001 +From 84f18bd4d3f1a2fcbc68041bcbcfdcf43a34d76a Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 08/11] Support precmd notifications from an interactive shell @@ -846,10 +849,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 38a64d17a0bf..6b3e1336ca15 100644 +index 36cf379f..172174e0 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10131,6 +10131,12 @@ Terminal::emit_pending_signals() +@@ -10113,6 +10113,12 @@ Terminal::emit_pending_signals() g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); } @@ -863,10 +866,10 @@ index 38a64d17a0bf..6b3e1336ca15 100644 if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte.sh.in b/src/vte.sh.in -index fc33a63f1f84..359afbc4645c 100644 +index 01b44e23..877fe93d 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in -@@ -32,7 +32,7 @@ __vte_prompt_command() { +@@ -38,7 +38,7 @@ __vte_prompt_command() { local pwd='~' [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} pwd="${pwd//[[:cntrl:]]}" @@ -876,10 +879,10 @@ index fc33a63f1f84..359afbc4645c 100644 } diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 2d1017f4a216..5e413393f7ec 100644 +index 2b277e05..1e926166 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -103,10 +103,11 @@ struct _VteTerminalClass { +@@ -110,10 +110,11 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); @@ -890,13 +893,13 @@ index 2d1017f4a216..5e413393f7ec 100644 - gpointer padding[14]; + gpointer padding[13]; + // FIXMEgtk4 use class private data instead VteTerminalClassPrivate *priv; - }; diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index ce95126b37b8..a84f17e21f65 100644 +index 22b6412b..4cc1b939 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -990,6 +990,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1249,6 +1249,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->encoding_changed = NULL; klass->char_size_changed = NULL; klass->notification_received = NULL; @@ -904,7 +907,7 @@ index ce95126b37b8..a84f17e21f65 100644 klass->shell_preexec = NULL; klass->window_title_changed = NULL; klass->icon_title_changed = NULL; -@@ -1092,6 +1093,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1353,6 +1354,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -929,7 +932,7 @@ index ce95126b37b8..a84f17e21f65 100644 * VteTerminal::shell-preexec: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index e90e183e7c2d..93a6dde3e19a 100644 +index bf85bdf4..cee56b65 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -52,6 +52,7 @@ enum { @@ -938,13 +941,13 @@ index e90e183e7c2d..93a6dde3e19a 100644 SIGNAL_SELECTION_CHANGED, + SIGNAL_SHELL_PRECMD, SIGNAL_SHELL_PREEXEC, - SIGNAL_TEXT_DELETED, - SIGNAL_TEXT_INSERTED, + SIGNAL_NOTIFICATION_RECEIVED, + SIGNAL_WINDOW_TITLE_CHANGED, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index bb98f8bc0903..25253c0af95b 100644 +index 041a9a81..5c1a5e50 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -641,6 +641,7 @@ public: +@@ -683,6 +683,7 @@ public: CWF = 1u << 2, NOTIFICATION = 1u << 3, SHELL_PREEXEC = 1u << 4, @@ -953,10 +956,10 @@ index bb98f8bc0903..25253c0af95b 100644 unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index 51ca37bdc748..10b494bddb47 100644 +index 84341cda..35eff3dd 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1403,7 +1403,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1402,7 +1402,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, return; } @@ -968,10 +971,10 @@ index 51ca37bdc748..10b494bddb47 100644 } } -- -2.31.1 +2.32.0 -From 28518832a97fc3ff2760de36cc13586c12555b62 Mon Sep 17 00:00:00 2001 +From b8c3a454e8a3dec36f1eaab960dfebca8d7100a6 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 09/11] Test the shell-precmd signal @@ -984,7 +987,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 2 files changed, 13 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 3975b9886d77..ff5fb5df052e 100644 +index 3975b988..ff5fb5df 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -310,6 +310,7 @@ class Window : Gtk.ApplicationWindow @@ -1008,10 +1011,10 @@ index 3975b9886d77..ff5fb5df052e 100644 { print("[shell] executing command\n"); diff --git a/src/app/app.cc b/src/app/app.cc -index 3caec42e5877..0ae59d2526cb 100644 +index 498db5a4..8cf66f88 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -1888,6 +1888,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2219,6 +2219,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -1024,7 +1027,7 @@ index 3caec42e5877..0ae59d2526cb 100644 static void shell_preexec_cb(VteTerminal *terminal) { -@@ -2133,6 +2139,7 @@ vteapp_window_constructed(GObject *object) +@@ -2521,6 +2527,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -1033,10 +1036,10 @@ index 3caec42e5877..0ae59d2526cb 100644 /* Settings */ -- -2.31.1 +2.32.0 -From e1c687e0651c06b72c7197e9f8f4a91122e8451c Mon Sep 17 00:00:00 2001 +From 4490f0a4648d6ed359447b2f817aa47b475e093f Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 10/11] Support tracking the active container inside the @@ -1078,10 +1081,10 @@ agreed upon across multiple different terminal emulators [1]. 6 files changed, 193 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index 6b3e1336ca15..abd6b449ae48 100644 +index 172174e0..d32e8eb7 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10150,6 +10150,14 @@ Terminal::emit_pending_signals() +@@ -10132,6 +10132,14 @@ Terminal::emit_pending_signals() m_window_title_pending.clear(); } @@ -1097,10 +1100,10 @@ index 6b3e1336ca15..abd6b449ae48 100644 if (m_current_directory_uri != m_current_directory_uri_pending) { m_current_directory_uri.swap(m_current_directory_uri_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 5e413393f7ec..32b2f32eef9d 100644 +index 1e926166..f81133e4 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -488,6 +488,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT +@@ -511,6 +511,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT _VTE_PUBLIC const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); _VTE_PUBLIC @@ -1112,10 +1115,10 @@ index 5e413393f7ec..32b2f32eef9d 100644 _VTE_PUBLIC const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index a84f17e21f65..aa3f04c6a02a 100644 +index 4cc1b939..4544d9a0 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -707,6 +707,12 @@ try +@@ -942,6 +942,12 @@ try case PROP_CURSOR_BLINK_MODE: g_value_set_enum (value, vte_terminal_get_cursor_blink_mode (terminal)); break; @@ -1128,7 +1131,7 @@ index a84f17e21f65..aa3f04c6a02a 100644 case PROP_CURRENT_DIRECTORY_URI: g_value_set_string (value, vte_terminal_get_current_directory_uri (terminal)); break; -@@ -2099,6 +2105,27 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2357,6 +2363,27 @@ vte_terminal_class_init(VteTerminalClass *klass) NULL, (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -1156,7 +1159,7 @@ index a84f17e21f65..aa3f04c6a02a 100644 /** * VteTerminal:current-directory-uri: * -@@ -4574,6 +4601,56 @@ catch (...) +@@ -4869,6 +4896,56 @@ catch (...) return -1; } @@ -1214,10 +1217,10 @@ index a84f17e21f65..aa3f04c6a02a 100644 * vte_terminal_get_current_directory_uri: * @terminal: a #VteTerminal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 93a6dde3e19a..651961436225 100644 +index cee56b65..e41f2f3a 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -76,6 +76,8 @@ enum { +@@ -72,6 +72,8 @@ enum { PROP_CJK_AMBIGUOUS_WIDTH, PROP_CURSOR_BLINK_MODE, PROP_CURSOR_SHAPE, @@ -1227,7 +1230,7 @@ index 93a6dde3e19a..651961436225 100644 PROP_CURRENT_FILE_URI, PROP_DELETE_BINDING, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 25253c0af95b..570c70b0c9e7 100644 +index 5c1a5e50..f3821475 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh @@ -59,6 +59,7 @@ @@ -1238,7 +1241,7 @@ index 25253c0af95b..570c70b0c9e7 100644 #include #include #include -@@ -97,6 +98,18 @@ typedef enum _VteCharacterReplacement { +@@ -110,6 +111,18 @@ typedef enum _VteCharacterReplacement { VTE_CHARACTER_REPLACEMENT_LINE_DRAWING } VteCharacterReplacement; @@ -1257,7 +1260,7 @@ index 25253c0af95b..570c70b0c9e7 100644 typedef struct _VtePaletteColor { struct { vte::color::rgb color; -@@ -622,6 +635,8 @@ public: +@@ -664,6 +677,8 @@ public: gboolean m_cursor_moved_pending; gboolean m_contents_changed_pending; @@ -1266,7 +1269,7 @@ index 25253c0af95b..570c70b0c9e7 100644 /* desktop notification */ std::string m_notification_summary; std::string m_notification_body; -@@ -642,6 +657,7 @@ public: +@@ -684,6 +699,7 @@ public: NOTIFICATION = 1u << 3, SHELL_PREEXEC = 1u << 4, SHELL_PRECMD = 1u << 5, @@ -1275,7 +1278,7 @@ index 25253c0af95b..570c70b0c9e7 100644 unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index 10b494bddb47..2a2ba4b47441 100644 +index 35eff3dd..d0f206be 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc @@ -19,10 +19,14 @@ @@ -1293,7 +1296,7 @@ index 10b494bddb47..2a2ba4b47441 100644 #ifdef HAVE_SYS_SYSLIMITS_H #include #endif -@@ -1385,6 +1389,88 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1384,6 +1388,88 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, if (token == endtoken) return; @@ -1383,10 +1386,10 @@ index 10b494bddb47..2a2ba4b47441 100644 ++token; -- -2.31.1 +2.32.0 -From 4a949461c975c2d062703e161f337d84f13a60d7 Mon Sep 17 00:00:00 2001 +From 7a296e18eb249bf872f3a50f0ab47a4d91324a44 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region @@ -1402,10 +1405,10 @@ This reverts commit 73713ec0644e232fb740170e399282be778d97f9. 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index abd6b449ae48..99ad5973c363 100644 +index d32e8eb7..aa246e5e 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -6595,10 +6595,7 @@ Terminal::maybe_end_selection() +@@ -6555,10 +6555,7 @@ Terminal::maybe_end_selection() /* * Terminal::select_all: * @@ -1417,7 +1420,7 @@ index abd6b449ae48..99ad5973c363 100644 */ void Terminal::select_all() -@@ -6607,8 +6604,8 @@ Terminal::select_all() +@@ -6567,8 +6564,8 @@ Terminal::select_all() m_selecting_had_delta = TRUE; @@ -1429,5 +1432,5 @@ index abd6b449ae48..99ad5973c363 100644 _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); -- -2.31.1 +2.32.0 diff --git a/vte291.spec b/vte291.spec index 798446c..465af0a 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,37 +10,39 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.64.2 -Release: 3%{?dist} +Version: 0.66.0 +Release: 1%{?dist} Summary: Terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources License: LGPLv3+ and MIT URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.64/vte-%{version}.tar.xz +Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 +Patch0: vte-0.66.0-prompt-command.patch # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 # https://pagure.io/fedora-workstation/issue/216 Patch100: vte291-cntnr-precmd-preexec-scroll.patch -BuildRequires: gcc-c++ -BuildRequires: gettext BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gnutls) >= %{gnutls_version} BuildRequires: pkgconfig(gobject-2.0) >= %{glib2_version} -BuildRequires: gobject-introspection-devel -BuildRequires: gperf -BuildRequires: gtk-doc -BuildRequires: meson BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version} BuildRequires: pkgconfig(icu-uc) >= %{icu_uc_version} BuildRequires: pkgconfig(libpcre2-8) >= %{pcre2_version} BuildRequires: pkgconfig(libsystemd) >= %{libsystemd_version} BuildRequires: pkgconfig(pango) >= %{pango_version} +BuildRequires: pkgconfig(zlib) +BuildRequires: gcc-c++ +BuildRequires: gettext +BuildRequires: gobject-introspection-devel +BuildRequires: gperf +BuildRequires: gtk-doc +BuildRequires: meson BuildRequires: systemd-rpm-macros BuildRequires: vala @@ -89,8 +91,7 @@ The vte-profile package contains a profile.d script for the VTE terminal emulator library. %prep -%setup -q -n vte-%{version} -%patch100 -p1 -b .cntnr-precmd-preexec-scroll +%autosetup -p1 -n vte-%{version} %if 0%{?flatpak} # Install user units where systemd macros expect them sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build @@ -108,6 +109,7 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %files -f vte-%{apiver}.lang %license COPYING.LGPL3 %license COPYING.XTERM +%doc README.md %{_libdir}/libvte-%{apiver}.so.0* %{_libdir}/girepository-1.0/ %{_userunitdir}/vte-spawn-.scope.d @@ -130,6 +132,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Tue Sep 28 2021 David King - 0.66.0-1 +- Update to 0.66.0 + * Fri Jul 23 2021 Fedora Release Engineering - 0.64.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From a2cb2d3c99d080b0a89103d383d6a898c9d647ff Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 1 Oct 2021 14:14:27 +0200 Subject: [PATCH 018/102] Require systemd-libs rather than systemd libsystemd lives in systemd-libs subpackage these days. --- vte291.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vte291.spec b/vte291.spec index 465af0a..e66dd35 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.66.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -53,7 +53,7 @@ Requires: gtk3%{?_isa} >= %{gtk3_version} Requires: libicu%{?_isa} >= %{icu_uc_version} Requires: pango >= %{pango_version} Requires: pcre2%{?_isa} >= %{pcre2_version} -Requires: systemd >= %{libsystemd_version} +Requires: systemd-libs%{?_isa} >= %{libsystemd_version} Requires: vte-profile Conflicts: gnome-terminal < 3.20.1-2 @@ -132,6 +132,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Fri Oct 01 2021 Kalev Lember - 0.66.0-2 +- Require systemd-libs rather than systemd + * Tue Sep 28 2021 David King - 0.66.0-1 - Update to 0.66.0 From 77371af24cd2f8e911ec522cf38764f58f8925ec Mon Sep 17 00:00:00 2001 From: David King Date: Mon, 1 Nov 2021 15:16:03 +0000 Subject: [PATCH 019/102] Update to 0.66.1 --- .gitignore | 1 + sources | 2 +- vte-0.66.0-prompt-command.patch | 29 ---------- vte291-cntnr-precmd-preexec-scroll.patch | 72 ++++++++++++------------ vte291.spec | 10 ++-- 5 files changed, 44 insertions(+), 70 deletions(-) delete mode 100644 vte-0.66.0-prompt-command.patch diff --git a/.gitignore b/.gitignore index 3c76eb9..8dc80c0 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,4 @@ /vte-0.64.2.tar.xz /vte-0.65.91.tar.bz2 /vte-0.66.0.tar.bz2 +/vte-0.66.1.tar.bz2 diff --git a/sources b/sources index ff827da..cc8196c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.66.0.tar.bz2) = 8868b27cb91d57ba00c3c5261a42054abb352663cb183053917c543c90a8940bfc289ac751858218673b4eecfb6e9706e397a065045646ffeda69e0f3e4f839a +SHA512 (vte-0.66.1.tar.bz2) = 2f3d3998104c4bcac449620a0babb3689239bf2cc757bf02b66d51a07f333891215198833686eebd0889ff8bdd237fabf3d4cac70034925fffc0e66790a4ec08 diff --git a/vte-0.66.0-prompt-command.patch b/vte-0.66.0-prompt-command.patch deleted file mode 100644 index b36e110..0000000 --- a/vte-0.66.0-prompt-command.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1fe2f3e9e11d1b8b0e45698a268b77e8f52e25db Mon Sep 17 00:00:00 2001 -From: Christian Persch -Date: Sat, 25 Sep 2021 10:50:29 +0200 -Subject: [PATCH] vte.sh: Fix the check for PROMPT_COMMAND when it is unset - -declare "helpfully" outputs on stdout for existing variables, but on stderr -for nonexistent ones. - -Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/37 ---- - src/vte.sh.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/vte.sh.in b/src/vte.sh.in -index 1aa40ba4..242d6c42 100644 ---- a/src/vte.sh.in -+++ b/src/vte.sh.in -@@ -48,7 +48,7 @@ if [[ -n "${BASH_VERSION:-}" ]]; then - # On older bash, we can only overwrite the whole PROMPT_COMMAND, so must - # use the __vte_prompt_command function which also sets the title. - -- if [[ "$(declare -p PROMPT_COMMAND)" =~ "declare -a" ]]; then -+ if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then - PROMPT_COMMAND+=(__vte_osc7) - else - PROMPT_COMMAND="__vte_prompt_command" --- -2.32.0 - diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index 3148bda..888acae 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,4 +1,4 @@ -From faa4340a6dc1df505d331eda732c094645bd3863 Mon Sep 17 00:00:00 2001 +From baa3752d4479336135d199b83ac3016fd1f71918 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 01/11] Add sequences and signals for desktop notification @@ -212,10 +212,10 @@ index 0a45c9b4..1a6bdc11 100644 default: break; -- -2.32.0 +2.33.1 -From 08aaeb7060411e91f142f928950d01af121e823a Mon Sep 17 00:00:00 2001 +From 8cb45a1e47b4406343f5748bbedad3f694c36b60 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND @@ -248,10 +248,10 @@ index 242d6c42..50242223 100644 } -- -2.32.0 +2.33.1 -From 1f3aa3194edb4d98ff83836e2f9151960314c040 Mon Sep 17 00:00:00 2001 +From bb722e49ee14906def24bac9bd0d4e594d71a3ce Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 Subject: [PATCH 03/11] Test the notification-received signal @@ -287,11 +287,11 @@ index 8ab27e5a..025f971b 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index 86135abe..e5f67cd9 100644 +index 3beff861..00a3e3b2 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2208,6 +2208,14 @@ window_window_title_changed_cb(VteTerminal* terminal, - #endif +@@ -2205,6 +2205,14 @@ window_window_title_changed_cb(VteTerminal* terminal, + gtk_window_set_title(GTK_WINDOW(window), title && title[0] ? title : "Terminal"); } +static void @@ -305,7 +305,7 @@ index 86135abe..e5f67cd9 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2503,6 +2511,8 @@ vteapp_window_constructed(GObject *object) +@@ -2501,6 +2509,8 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); @@ -315,10 +315,10 @@ index 86135abe..e5f67cd9 100644 #if VTE_GTK == 3 if (options.no_double_buffer) { -- -2.32.0 +2.33.1 -From 67f64a50e3671e50e6cf82f7f69ed1543253a019 Mon Sep 17 00:00:00 2001 +From 005e6d651cddca7145ca895a3ddf0bd19764454f Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 Subject: [PATCH 04/11] Add a property to configure the scroll speed @@ -523,10 +523,10 @@ index b4dfb2a4..2da56ebd 100644 bool set_fallback_scrolling(bool set); auto fallback_scrolling() const noexcept { return m_fallback_scrolling; } -- -2.32.0 +2.33.1 -From 7c7ab09278605488a2710eac246842d646e0cfc7 Mon Sep 17 00:00:00 2001 +From dd4f63266f88bcb403513e14fc84e61a2a8e0656 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 Subject: [PATCH 05/11] Test the scroll-speed property @@ -567,10 +567,10 @@ index 025f971b..51b5d641 100644 "Specify the number of scrollback-lines", null }, { "transparent", 'T', 0, OptionArg.INT, ref transparency_percent, diff --git a/src/app/app.cc b/src/app/app.cc -index e5f67cd9..e812416c 100644 +index 00a3e3b2..a6f209bb 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -115,6 +115,7 @@ public: +@@ -116,6 +116,7 @@ public: int verbosity{0}; double cell_height_scale{1.0}; double cell_width_scale{1.0}; @@ -578,7 +578,7 @@ index e5f67cd9..e812416c 100644 VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM}; VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK}; VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS}; -@@ -617,6 +618,8 @@ public: +@@ -618,6 +619,8 @@ public: "Reverse foreground/background colors", nullptr }, { "require-systemd-scope", 0, 0, G_OPTION_ARG_NONE, &require_systemd_scope, "Require use of a systemd user scope", nullptr }, @@ -587,7 +587,7 @@ index e5f67cd9..e812416c 100644 { "scroll-unit-is-pixels", 0, 0, G_OPTION_ARG_NONE, &scroll_unit_is_pixels, "Use pixels as scroll unit", nullptr }, { "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines, -@@ -2547,6 +2550,7 @@ vteapp_window_constructed(GObject *object) +@@ -2545,6 +2548,7 @@ vteapp_window_constructed(GObject *object) vte_terminal_set_rewrap_on_resize(window->terminal, !options.no_rewrap); vte_terminal_set_scroll_on_output(window->terminal, false); vte_terminal_set_scroll_on_keystroke(window->terminal, true); @@ -596,10 +596,10 @@ index e5f67cd9..e812416c 100644 vte_terminal_set_scrollback_lines(window->terminal, options.scrollback_lines); vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); -- -2.32.0 +2.33.1 -From fb7db8f86848dc7ad6ea585d3211e935603d1aa9 Mon Sep 17 00:00:00 2001 +From 145bbaedfe0dbd2102ca38acff53e749666c612a Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 06/11] Support preexec notifications from an interactive shell @@ -752,10 +752,10 @@ index 1a6bdc11..84341cda 100644 bool -- -2.32.0 +2.33.1 -From 4a699bf2ff119c9267faeac81b4db9421b782837 Mon Sep 17 00:00:00 2001 +From a6b24e55d1da9ffc35defa6c4d4cb4b16fc50814 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 Subject: [PATCH 07/11] Test the shell-preexec signal @@ -792,10 +792,10 @@ index 51b5d641..3975b988 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index e812416c..498db5a4 100644 +index a6f209bb..002db773 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2219,6 +2219,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2216,6 +2216,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -808,7 +808,7 @@ index e812416c..498db5a4 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2515,6 +2521,7 @@ vteapp_window_constructed(GObject *object) +@@ -2513,6 +2519,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -817,10 +817,10 @@ index e812416c..498db5a4 100644 /* Settings */ #if VTE_GTK == 3 -- -2.32.0 +2.33.1 -From 84f18bd4d3f1a2fcbc68041bcbcfdcf43a34d76a Mon Sep 17 00:00:00 2001 +From a21192aa95629c59fdf1ca2e214b194ceac34fa0 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 08/11] Support precmd notifications from an interactive shell @@ -971,10 +971,10 @@ index 84341cda..35eff3dd 100644 } } -- -2.32.0 +2.33.1 -From b8c3a454e8a3dec36f1eaab960dfebca8d7100a6 Mon Sep 17 00:00:00 2001 +From 92f19ab6d981507e6d348c45802701e7cd8b0503 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 09/11] Test the shell-precmd signal @@ -1011,10 +1011,10 @@ index 3975b988..ff5fb5df 100644 { print("[shell] executing command\n"); diff --git a/src/app/app.cc b/src/app/app.cc -index 498db5a4..8cf66f88 100644 +index 002db773..dde27c9a 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2219,6 +2219,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2216,6 +2216,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -1027,7 +1027,7 @@ index 498db5a4..8cf66f88 100644 static void shell_preexec_cb(VteTerminal *terminal) { -@@ -2521,6 +2527,7 @@ vteapp_window_constructed(GObject *object) +@@ -2519,6 +2525,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -1036,10 +1036,10 @@ index 498db5a4..8cf66f88 100644 /* Settings */ -- -2.32.0 +2.33.1 -From 4490f0a4648d6ed359447b2f817aa47b475e093f Mon Sep 17 00:00:00 2001 +From 66afaa0b1eae0d55264068aadf689cd2d23d00a3 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 10/11] Support tracking the active container inside the @@ -1386,10 +1386,10 @@ index 35eff3dd..d0f206be 100644 ++token; -- -2.32.0 +2.33.1 -From 7a296e18eb249bf872f3a50f0ab47a4d91324a44 Mon Sep 17 00:00:00 2001 +From 70c33c909b2ded3536a0f318c503df27bbd94722 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region @@ -1432,5 +1432,5 @@ index d32e8eb7..aa246e5e 100644 _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); -- -2.32.0 +2.33.1 diff --git a/vte291.spec b/vte291.spec index e66dd35..b89fabe 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,8 +10,8 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.66.0 -Release: 2%{?dist} +Version: 0.66.1 +Release: 1%{?dist} Summary: Terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -20,11 +20,10 @@ License: LGPLv3+ and MIT URL: https://wiki.gnome.org/Apps/Terminal/VTE Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 -Patch0: vte-0.66.0-prompt-command.patch # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 # https://pagure.io/fedora-workstation/issue/216 -Patch100: vte291-cntnr-precmd-preexec-scroll.patch +Patch0: vte291-cntnr-precmd-preexec-scroll.patch BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -132,6 +131,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Nov 01 2021 David King - 0.66.1-1 +- Update to 0.66.1 + * Fri Oct 01 2021 Kalev Lember - 0.66.0-2 - Require systemd-libs rather than systemd From 7d3f755bfabe9c330c252a7bf38f2ea19b3b3890 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 16 Dec 2021 12:08:53 +0000 Subject: [PATCH 020/102] Update to 0.66.2 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8dc80c0..cf9c907 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,4 @@ /vte-0.65.91.tar.bz2 /vte-0.66.0.tar.bz2 /vte-0.66.1.tar.bz2 +/vte-0.66.2.tar.xz diff --git a/sources b/sources index cc8196c..0322a4a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.66.1.tar.bz2) = 2f3d3998104c4bcac449620a0babb3689239bf2cc757bf02b66d51a07f333891215198833686eebd0889ff8bdd237fabf3d4cac70034925fffc0e66790a4ec08 +SHA512 (vte-0.66.2.tar.xz) = 6e89947f22c866a79270c700f761ec393ed8337557d4c6a90f3b7ba61caf7189406ab7731142754c99f121add6b483063d1b21e7791d2db148ad37abb7b525b9 diff --git a/vte291.spec b/vte291.spec index b89fabe..17f3f81 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,7 +10,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.66.1 +Version: 0.66.2 Release: 1%{?dist} Summary: Terminal emulator library @@ -18,7 +18,7 @@ Summary: Terminal emulator library License: LGPLv3+ and MIT URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 +Source0: https://download.gnome.org/sources/vte/0.66/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -131,6 +131,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Thu Dec 16 2021 David King - 0.66.2-1 +- Update to 0.66.2 + * Mon Nov 01 2021 David King - 0.66.1-1 - Update to 0.66.1 From 0a24cd9d6d64f4d8e048801557ea76d636347383 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 04:12:14 +0000 Subject: [PATCH 021/102] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 17f3f81..3222d5e 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.66.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -131,6 +131,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 0.66.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Dec 16 2021 David King - 0.66.2-1 - Update to 0.66.2 From 6cb444aa241cf310e97d1e7a448759f71d617ccb Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 27 Jan 2022 11:23:05 +0000 Subject: [PATCH 022/102] Add Vala 0.55.1 patch from upstream (#2047106) --- vte291-0.66.2-vala-accessibility.patch | 44 ++++++++++++++++++++++++++ vte291.spec | 4 ++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 vte291-0.66.2-vala-accessibility.patch diff --git a/vte291-0.66.2-vala-accessibility.patch b/vte291-0.66.2-vala-accessibility.patch new file mode 100644 index 0000000..0974708 --- /dev/null +++ b/vte291-0.66.2-vala-accessibility.patch @@ -0,0 +1,44 @@ +From 069b68f393c46ebfc6734708f1446419ceed95da Mon Sep 17 00:00:00 2001 +From: Rico Tzschichholz +Date: Wed, 1 Dec 2021 08:21:36 +0100 +Subject: [PATCH] vala: Fix accessibility of constant intializer expression + +--- + bindings/vala/app.vala | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala +index 8ab27e5a..faaefe47 100644 +--- a/bindings/vala/app.vala ++++ b/bindings/vala/app.vala +@@ -822,11 +822,11 @@ class App : Gtk.Application + { + public static bool audible = false; + public static string? command = null; +- private static string? cjk_ambiguous_width_string = null; +- private static string? cursor_blink_mode_string = null; +- private static string? cursor_background_color_string = null; +- private static string? cursor_foreground_color_string = null; +- private static string? cursor_shape_string = null; ++ public static string? cjk_ambiguous_width_string = null; ++ public static string? cursor_blink_mode_string = null; ++ public static string? cursor_background_color_string = null; ++ public static string? cursor_foreground_color_string = null; ++ public static string? cursor_shape_string = null; + public static string[]? dingus = null; + public static bool debug = false; + public static string? encoding = null; +@@ -834,8 +834,8 @@ class App : Gtk.Application + public static int extra_margin = 0; + public static string? font_string = null; + public static string? geometry = null; +- private static string? hl_bg_color_string = null; +- private static string? hl_fg_color_string = null; ++ public static string? hl_bg_color_string = null; ++ public static string? hl_fg_color_string = null; + public static string? icon_title = null; + public static bool keep = false; + public static bool no_argb_visual = false; +-- +GitLab + diff --git a/vte291.spec b/vte291.spec index 3222d5e..b00fd92 100644 --- a/vte291.spec +++ b/vte291.spec @@ -24,6 +24,8 @@ Source0: https://download.gnome.org/sources/vte/0.66/vte-%{version}.tar.x # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 # https://pagure.io/fedora-workstation/issue/216 Patch0: vte291-cntnr-precmd-preexec-scroll.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2047106 +Patch1: vte291-0.66.2-vala-accessibility.patch BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -131,7 +133,7 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog -* Sat Jan 22 2022 Fedora Release Engineering - 0.66.2-2 +* Thu Jan 27 2022 David King - 0.66.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Dec 16 2021 David King - 0.66.2-1 From ead1cef00f8aa690a1c107af533179a42da91584 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 17 Feb 2022 16:18:54 +0000 Subject: [PATCH 023/102] Update to 0.67.90 --- .gitignore | 1 + sources | 2 +- vte291-0.66.2-vala-accessibility.patch | 44 --- vte291-cntnr-precmd-preexec-scroll.patch | 343 +++++++++++++++-------- vte291.spec | 11 +- 5 files changed, 233 insertions(+), 168 deletions(-) delete mode 100644 vte291-0.66.2-vala-accessibility.patch diff --git a/.gitignore b/.gitignore index cf9c907..1eb86d2 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,4 @@ /vte-0.66.0.tar.bz2 /vte-0.66.1.tar.bz2 /vte-0.66.2.tar.xz +/vte-0.67.90.tar.xz diff --git a/sources b/sources index 0322a4a..620f98b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.66.2.tar.xz) = 6e89947f22c866a79270c700f761ec393ed8337557d4c6a90f3b7ba61caf7189406ab7731142754c99f121add6b483063d1b21e7791d2db148ad37abb7b525b9 +SHA512 (vte-0.67.90.tar.xz) = 867a3dfe9300a7ff691185e72195e3550c29d52022dc87428036d69f36710747ba2d76f26f989a9ed9b5c18ddb30464f4d42041e06264154143684ffb6949c10 diff --git a/vte291-0.66.2-vala-accessibility.patch b/vte291-0.66.2-vala-accessibility.patch deleted file mode 100644 index 0974708..0000000 --- a/vte291-0.66.2-vala-accessibility.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 069b68f393c46ebfc6734708f1446419ceed95da Mon Sep 17 00:00:00 2001 -From: Rico Tzschichholz -Date: Wed, 1 Dec 2021 08:21:36 +0100 -Subject: [PATCH] vala: Fix accessibility of constant intializer expression - ---- - bindings/vala/app.vala | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 8ab27e5a..faaefe47 100644 ---- a/bindings/vala/app.vala -+++ b/bindings/vala/app.vala -@@ -822,11 +822,11 @@ class App : Gtk.Application - { - public static bool audible = false; - public static string? command = null; -- private static string? cjk_ambiguous_width_string = null; -- private static string? cursor_blink_mode_string = null; -- private static string? cursor_background_color_string = null; -- private static string? cursor_foreground_color_string = null; -- private static string? cursor_shape_string = null; -+ public static string? cjk_ambiguous_width_string = null; -+ public static string? cursor_blink_mode_string = null; -+ public static string? cursor_background_color_string = null; -+ public static string? cursor_foreground_color_string = null; -+ public static string? cursor_shape_string = null; - public static string[]? dingus = null; - public static bool debug = false; - public static string? encoding = null; -@@ -834,8 +834,8 @@ class App : Gtk.Application - public static int extra_margin = 0; - public static string? font_string = null; - public static string? geometry = null; -- private static string? hl_bg_color_string = null; -- private static string? hl_fg_color_string = null; -+ public static string? hl_bg_color_string = null; -+ public static string? hl_fg_color_string = null; - public static string? icon_title = null; - public static bool keep = false; - public static bool no_argb_visual = false; --- -GitLab - diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index 888acae..6032d7a 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,7 +1,107 @@ -From baa3752d4479336135d199b83ac3016fd1f71918 Mon Sep 17 00:00:00 2001 +From e723a6fa96bc50effbd046a2c2419cc51b3cc8c1 Mon Sep 17 00:00:00 2001 +From: Christian Persch +Date: Sat, 12 Feb 2022 21:10:08 +0100 +Subject: [PATCH 01/12] Revert "emulation: Support XTVERSION sequence" + +This reverts commit 0718a9a7f9300b2526eddb0fc74e25eef34795ba. + +Issue #235 shows commiting this was premature and there's more discussion needed. +--- + src/parser-reply.hh | 1 - + src/parser-seq.py | 2 -- + src/vteseq.cc | 32 ++------------------------------ + 3 files changed, 2 insertions(+), 33 deletions(-) + +diff --git a/src/parser-reply.hh b/src/parser-reply.hh +index c9046b1a..1ba3022a 100644 +--- a/src/parser-reply.hh ++++ b/src/parser-reply.hh +@@ -57,7 +57,6 @@ _VTE_REPLY(DECCTR, DCS, 's', NONE, CASH, _VTE_REPLY_PARAMS({2})) /* color + _VTE_REPLY(DECAUPSS, DCS, 'u', NONE, BANG, ) /* assign user preferred supplemental set */ + _VTE_REPLY(DECCIR, DCS, 'u', NONE, CASH, _VTE_REPLY_PARAMS({1})) /* cursor information report */ + _VTE_REPLY(DECRPTUI, DCS, '|', NONE, BANG, _VTE_REPLY_STRING("7E565445") /* "~VTE" */) /* report terminal unit ID */ +-_VTE_REPLY(XTERM_DSR, DCS, '|', GT, NONE, ) /* xterm terminal version report */ + _VTE_REPLY(DECRPFK, DCS, '}', NONE, DQUOTE,) /* report function key */ + _VTE_REPLY(DECCKSR, DCS, '~', NONE, BANG, ) /* memory checksum report */ + _VTE_REPLY(DECRPAK, DCS, '~', NONE, DQUOTE,) /* report all modifiers/alphanumeric key */ +diff --git a/src/parser-seq.py b/src/parser-seq.py +index c484c0ac..8692b147 100755 +--- a/src/parser-seq.py ++++ b/src/parser-seq.py +@@ -756,8 +756,6 @@ sequences = [ + comment='select terminal id'), + seq_CSI('DECCRTST', 'q', intermediates=(Intermediate.MINUS,), flags=Flags.NOP, + comment='CRT saver time'), +- seq_CSI('XTERM_VERSION', 'q', pintro=(ParameterIntro.GT,), +- comment='request xterm version report'), + seq_CSI('DECSTBM', 'r', + comment='set top and bottom margins'), + seq_CSI('DECSKCV', 'r', intermediates=(Intermediate.SPACE,), flags=Flags.NOP, +diff --git a/src/vteseq.cc b/src/vteseq.cc +index 007ddb69..874d2405 100644 +--- a/src/vteseq.cc ++++ b/src/vteseq.cc +@@ -69,11 +69,6 @@ enum { + VTE_SGR_COLOR_SPEC_LEGACY = 5 + }; + +-inline constexpr int firmware_version() noexcept +-{ +- return (VTE_MAJOR_VERSION * 100 + VTE_MINOR_VERSION) * 100 + VTE_MICRO_VERSION; +-} +- + void + vte::parser::Sequence::print() const noexcept + { +@@ -2410,7 +2405,8 @@ Terminal::DA2(vte::parser::Sequence const& seq) + if (seq.collect1(0, 0) != 0) + return; + +- reply(seq, VTE_REPLY_DECDA2R, {65, firmware_version(), 1}); ++ int const version = (VTE_MAJOR_VERSION * 100 + VTE_MINOR_VERSION) * 100 + VTE_MICRO_VERSION; ++ reply(seq, VTE_REPLY_DECDA2R, {65, version, 1}); + } + + void +@@ -8848,30 +8844,6 @@ Terminal::XTERM_STCAP(vte::parser::Sequence const& seq) + */ + } + +-void +-Terminal::XTERM_VERSION(vte::parser::Sequence const& seq) +-{ +- /* +- * XTERM_VERSION - xterm request version report +- * +- * Returns the xterm name and version as XTERM_DSR. +- * +- * Arguments: +- * args[0]: select function +- * 0: report xterm name and version +- * +- * Defaults: +- * args[0]: no defaults +- * +- * References: XTERM +- */ +- +- if (seq.collect1(0) != 0) +- return; +- +- reply(seq, VTE_REPLY_XTERM_DSR, {}, "VTE(%d)", firmware_version()); +-} +- + void + Terminal::XTERM_WM(vte::parser::Sequence const& seq) + { +-- +2.35.1 + + +From 90c5ba23a1fca5553c453f07ec010700eb2c70f2 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 -Subject: [PATCH 01/11] Add sequences and signals for desktop notification +Subject: [PATCH 02/12] Add sequences and signals for desktop notification Add sequences OSC 777 ; notify ; SUMMARY ; BODY BEL @@ -36,10 +136,10 @@ index 241128c3..4412cf3d 100644 VOID:STRING,UINT VOID:UINT,UINT diff --git a/src/vte.cc b/src/vte.cc -index ec330490..f39578ac 100644 +index 8b75883f..05cc5589 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10082,6 +10082,14 @@ Terminal::emit_pending_signals() +@@ -10032,6 +10032,14 @@ Terminal::emit_pending_signals() emit_adjustment_changed(); @@ -55,23 +155,25 @@ index ec330490..f39578ac 100644 if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 05f6674f..0b9b8dc4 100644 +index 41f153d0..1e9a737a 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -109,8 +109,10 @@ struct _VteTerminalClass { +@@ -108,10 +108,12 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); + void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); + - /* Padding for future expansion. */ -- gpointer padding[16]; -+ gpointer padding[15]; + #if _VTE_GTK == 3 + /* Compatibility padding due to fedora patches intruding on our ABI */ + /*< private >*/ +- gpointer _extra_padding[3]; ++ gpointer _extra_padding[2]; + #endif /* _VTE_GTK == 3 */ - // FIXMEgtk4 use class private data instead - VteTerminalClassPrivate *priv; + /* Add new vfuncs here, and subtract from the padding below. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 000be62d..04eceea1 100644 +index 05b82294..a09a2f75 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -1242,6 +1242,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -122,10 +224,10 @@ index 6b7a1ea2..8ba10395 100644 LAST_SIGNAL }; diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 77843507..b4dfb2a4 100644 +index eb95ad68..69a32276 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -663,6 +663,10 @@ public: +@@ -660,6 +660,10 @@ public: gboolean m_cursor_moved_pending; gboolean m_contents_changed_pending; @@ -136,7 +238,7 @@ index 77843507..b4dfb2a4 100644 std::string m_window_title{}; std::string m_current_directory_uri{}; std::string m_current_file_uri{}; -@@ -676,6 +680,7 @@ public: +@@ -673,6 +677,7 @@ public: TITLE = 1u << 0, CWD = 1u << 1, CWF = 1u << 2, @@ -155,7 +257,7 @@ index 77843507..b4dfb2a4 100644 vte::parser::StringTokeniser::const_iterator& token, vte::parser::StringTokeniser::const_iterator const& endtoken, diff --git a/src/vteseq.cc b/src/vteseq.cc -index 0a45c9b4..1a6bdc11 100644 +index 874d2405..537e8e13 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc @@ -1376,6 +1376,33 @@ Terminal::delete_lines(vte::grid::row_t param) @@ -192,7 +294,7 @@ index 0a45c9b4..1a6bdc11 100644 bool Terminal::get_osc_color_index(int osc, int value, -@@ -6535,6 +6562,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6541,6 +6568,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE); break; @@ -203,7 +305,7 @@ index 0a45c9b4..1a6bdc11 100644 case VTE_OSC_XTERM_SET_ICON_TITLE: case VTE_OSC_XTERM_SET_XPROPERTY: case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG: -@@ -6576,7 +6607,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6582,7 +6613,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC: case VTE_OSC_URXVT_VIEW_UP: case VTE_OSC_URXVT_VIEW_DOWN: @@ -212,13 +314,13 @@ index 0a45c9b4..1a6bdc11 100644 default: break; -- -2.33.1 +2.35.1 -From 8cb45a1e47b4406343f5748bbedad3f694c36b60 Mon Sep 17 00:00:00 2001 +From 4f2b191321033a1ac5ee49f10bf7290b07dc0af1 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 -Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND +Subject: [PATCH 03/12] vte.sh: Emit OSC 777 from PROMPT_COMMAND For some reason, the three consecutive backslashes break the parsing. As Christian Persch suggested, replacing the double quotes with @@ -248,13 +350,13 @@ index 242d6c42..50242223 100644 } -- -2.33.1 +2.35.1 -From bb722e49ee14906def24bac9bd0d4e594d71a3ce Mon Sep 17 00:00:00 2001 +From 1481641c0596217b6ca7f73243a5c5048202e10b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 -Subject: [PATCH 03/11] Test the notification-received signal +Subject: [PATCH 04/12] Test the notification-received signal --- bindings/vala/app.vala | 7 +++++++ @@ -262,7 +364,7 @@ Subject: [PATCH 03/11] Test the notification-received signal 2 files changed, 17 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 8ab27e5a..025f971b 100644 +index 4bcb5804..06546440 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -309,6 +309,8 @@ class Window : Gtk.ApplicationWindow @@ -287,10 +389,10 @@ index 8ab27e5a..025f971b 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index 3beff861..00a3e3b2 100644 +index 3b7835aa..fc8220a5 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2205,6 +2205,14 @@ window_window_title_changed_cb(VteTerminal* terminal, +@@ -2209,6 +2209,14 @@ window_window_title_changed_cb(VteTerminal* terminal, gtk_window_set_title(GTK_WINDOW(window), title && title[0] ? title : "Terminal"); } @@ -305,7 +407,7 @@ index 3beff861..00a3e3b2 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2501,6 +2509,8 @@ vteapp_window_constructed(GObject *object) +@@ -2505,6 +2513,8 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); @@ -315,13 +417,13 @@ index 3beff861..00a3e3b2 100644 #if VTE_GTK == 3 if (options.no_double_buffer) { -- -2.33.1 +2.35.1 -From 005e6d651cddca7145ca895a3ddf0bd19764454f Mon Sep 17 00:00:00 2001 +From e86c937f6d8f03930d97b942a13df4acd9bef92a Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 -Subject: [PATCH 04/11] Add a property to configure the scroll speed +Subject: [PATCH 05/12] Add a property to configure the scroll speed By default, it is set to zero which gives the current behaviour of moving the buffer by a function of the number of visible rows. @@ -337,10 +439,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1103380 6 files changed, 77 insertions(+), 1 deletion(-) diff --git a/doc/reference/vte-sections.txt.in b/doc/reference/vte-sections.txt.in -index 1180f972..f097d4b9 100644 +index 283dd056..64907389 100644 --- a/doc/reference/vte-sections.txt.in +++ b/doc/reference/vte-sections.txt.in -@@ -56,6 +56,7 @@ vte_terminal_get_cursor_blink_mode +@@ -58,6 +58,7 @@ vte_terminal_get_cursor_blink_mode vte_terminal_set_cursor_blink_mode vte_terminal_get_text_blink_mode vte_terminal_set_text_blink_mode @@ -349,10 +451,10 @@ index 1180f972..f097d4b9 100644 vte_terminal_get_scrollback_lines vte_terminal_set_font diff --git a/src/vte.cc b/src/vte.cc -index f39578ac..f027ce3b 100644 +index 05cc5589..a4e6069d 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -9289,6 +9289,7 @@ vte_cairo_get_clip_region(cairo_t *cr) +@@ -9239,6 +9239,7 @@ vte_cairo_get_clip_region(cairo_t *cr) bool Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) { @@ -360,7 +462,7 @@ index f39578ac..f027ce3b 100644 gdouble v; gint cnt, i; int button; -@@ -9323,7 +9324,13 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) +@@ -9273,7 +9274,13 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) return true; } @@ -375,7 +477,7 @@ index f39578ac..f027ce3b 100644 _vte_debug_print(VTE_DEBUG_EVENTS, "Scroll speed is %d lines per non-smooth scroll unit\n", (int) v); -@@ -9633,6 +9640,16 @@ Terminal::decscusr_cursor_shape() const noexcept +@@ -9583,6 +9590,16 @@ Terminal::decscusr_cursor_shape() const noexcept } } @@ -393,10 +495,10 @@ index f39578ac..f027ce3b 100644 Terminal::set_scrollback_lines(long lines) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 0b9b8dc4..20c930f7 100644 +index 1e9a737a..b63967a3 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -324,6 +324,10 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, +@@ -330,6 +330,10 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, _VTE_PUBLIC VteCursorShape vte_terminal_get_cursor_shape(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); @@ -408,7 +510,7 @@ index 0b9b8dc4..20c930f7 100644 _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 04eceea1..7e405a39 100644 +index a09a2f75..ab1de923 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -993,6 +993,9 @@ try @@ -453,7 +555,7 @@ index 04eceea1..7e405a39 100644 /** * VteTerminal:scrollback-lines: * -@@ -5666,6 +5687,36 @@ catch (...) +@@ -5726,6 +5747,36 @@ catch (...) return -1; } @@ -503,10 +605,10 @@ index 8ba10395..f6cd891b 100644 PROP_SCROLL_ON_KEYSTROKE, PROP_SCROLL_ON_OUTPUT, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index b4dfb2a4..2da56ebd 100644 +index 69a32276..d3e25179 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -429,6 +429,7 @@ public: +@@ -426,6 +426,7 @@ public: bool m_fallback_scrolling{true}; bool m_scroll_on_output{false}; bool m_scroll_on_keystroke{true}; @@ -523,13 +625,13 @@ index b4dfb2a4..2da56ebd 100644 bool set_fallback_scrolling(bool set); auto fallback_scrolling() const noexcept { return m_fallback_scrolling; } -- -2.33.1 +2.35.1 -From dd4f63266f88bcb403513e14fc84e61a2a8e0656 Mon Sep 17 00:00:00 2001 +From a1da65e5390c1dfdd201a29c912181712de2e9d6 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 -Subject: [PATCH 05/11] Test the scroll-speed property +Subject: [PATCH 06/12] Test the scroll-speed property https://bugzilla.redhat.com/show_bug.cgi?id=1103380 --- @@ -538,7 +640,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1103380 2 files changed, 8 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 025f971b..51b5d641 100644 +index 06546440..552a702d 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -335,6 +335,7 @@ class Window : Gtk.ApplicationWindow @@ -567,10 +669,10 @@ index 025f971b..51b5d641 100644 "Specify the number of scrollback-lines", null }, { "transparent", 'T', 0, OptionArg.INT, ref transparency_percent, diff --git a/src/app/app.cc b/src/app/app.cc -index 00a3e3b2..a6f209bb 100644 +index fc8220a5..c6f5cc0b 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -116,6 +116,7 @@ public: +@@ -118,6 +118,7 @@ public: int verbosity{0}; double cell_height_scale{1.0}; double cell_width_scale{1.0}; @@ -578,7 +680,7 @@ index 00a3e3b2..a6f209bb 100644 VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM}; VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK}; VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS}; -@@ -618,6 +619,8 @@ public: +@@ -620,6 +621,8 @@ public: "Reverse foreground/background colors", nullptr }, { "require-systemd-scope", 0, 0, G_OPTION_ARG_NONE, &require_systemd_scope, "Require use of a systemd user scope", nullptr }, @@ -587,7 +689,7 @@ index 00a3e3b2..a6f209bb 100644 { "scroll-unit-is-pixels", 0, 0, G_OPTION_ARG_NONE, &scroll_unit_is_pixels, "Use pixels as scroll unit", nullptr }, { "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines, -@@ -2545,6 +2548,7 @@ vteapp_window_constructed(GObject *object) +@@ -2549,6 +2552,7 @@ vteapp_window_constructed(GObject *object) vte_terminal_set_rewrap_on_resize(window->terminal, !options.no_rewrap); vte_terminal_set_scroll_on_output(window->terminal, false); vte_terminal_set_scroll_on_keystroke(window->terminal, true); @@ -596,13 +698,13 @@ index 00a3e3b2..a6f209bb 100644 vte_terminal_set_scrollback_lines(window->terminal, options.scrollback_lines); vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); -- -2.33.1 +2.35.1 -From 145bbaedfe0dbd2102ca38acff53e749666c612a Mon Sep 17 00:00:00 2001 +From f7fafa786a3b6e5568eefab7ad318594813aa4d5 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 -Subject: [PATCH 06/11] Support preexec notifications from an interactive shell +Subject: [PATCH 07/12] Support preexec notifications from an interactive shell Add sequences OSC 777 ; preexec BEL @@ -628,10 +730,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index f027ce3b..36cf379f 100644 +index a4e6069d..6d8ab2bb 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10107,6 +10107,12 @@ Terminal::emit_pending_signals() +@@ -10057,6 +10057,12 @@ Terminal::emit_pending_signals() m_notification_body.c_str()); } @@ -661,23 +763,25 @@ index 50242223..01b44e23 100644 elif [[ -n "${ZSH_VERSION:-}" ]]; then diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 20c930f7..2b277e05 100644 +index b63967a3..062b6694 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -110,9 +110,10 @@ struct _VteTerminalClass { +@@ -109,11 +109,12 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); + void (*shell_preexec)(VteTerminal* terminal); - /* Padding for future expansion. */ -- gpointer padding[15]; -+ gpointer padding[14]; + #if _VTE_GTK == 3 + /* Compatibility padding due to fedora patches intruding on our ABI */ + /*< private >*/ +- gpointer _extra_padding[2]; ++ gpointer _extra_padding[1]; + #endif /* _VTE_GTK == 3 */ - // FIXMEgtk4 use class private data instead - VteTerminalClassPrivate *priv; + /* Add new vfuncs here, and subtract from the padding below. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 7e405a39..22b6412b 100644 +index ab1de923..a4d51bfb 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -1249,6 +1249,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -725,10 +829,10 @@ index f6cd891b..bf85bdf4 100644 SIGNAL_WINDOW_TITLE_CHANGED, LAST_SIGNAL diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 2da56ebd..041a9a81 100644 +index d3e25179..b4f1b4c9 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -682,6 +682,7 @@ public: +@@ -679,6 +679,7 @@ public: CWD = 1u << 1, CWF = 1u << 2, NOTIFICATION = 1u << 3, @@ -737,7 +841,7 @@ index 2da56ebd..041a9a81 100644 unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index 1a6bdc11..84341cda 100644 +index 537e8e13..dbc6276f 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc @@ -1401,6 +1401,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, @@ -752,13 +856,13 @@ index 1a6bdc11..84341cda 100644 bool -- -2.33.1 +2.35.1 -From a6b24e55d1da9ffc35defa6c4d4cb4b16fc50814 Mon Sep 17 00:00:00 2001 +From 9921679046106711276fe5304bc2d04b71553dec Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 -Subject: [PATCH 07/11] Test the shell-preexec signal +Subject: [PATCH 08/12] Test the shell-preexec signal https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 @@ -768,7 +872,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 2 files changed, 13 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 51b5d641..3975b988 100644 +index 552a702d..cc30f9ad 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -310,6 +310,7 @@ class Window : Gtk.ApplicationWindow @@ -792,10 +896,10 @@ index 51b5d641..3975b988 100644 class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index a6f209bb..002db773 100644 +index c6f5cc0b..33a9481e 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2216,6 +2216,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2220,6 +2220,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -808,7 +912,7 @@ index a6f209bb..002db773 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2513,6 +2519,7 @@ vteapp_window_constructed(GObject *object) +@@ -2517,6 +2523,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -817,13 +921,13 @@ index a6f209bb..002db773 100644 /* Settings */ #if VTE_GTK == 3 -- -2.33.1 +2.35.1 -From a21192aa95629c59fdf1ca2e214b194ceac34fa0 Mon Sep 17 00:00:00 2001 +From 9a9c9b064447d50b0ebcd4c87284f68dc5414158 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 -Subject: [PATCH 08/11] Support precmd notifications from an interactive shell +Subject: [PATCH 09/12] Support precmd notifications from an interactive shell Add sequences OSC 777 ; precmd BEL @@ -841,18 +945,18 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 --- src/vte.cc | 6 ++++++ src/vte.sh.in | 2 +- - src/vte/vteterminal.h | 3 ++- + src/vte/vteterminal.h | 7 +------ src/vtegtk.cc | 18 ++++++++++++++++++ src/vtegtk.hh | 1 + src/vteinternal.hh | 1 + src/vteseq.cc | 4 +++- - 7 files changed, 32 insertions(+), 3 deletions(-) + 7 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 36cf379f..172174e0 100644 +index 6d8ab2bb..e8a344ee 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10113,6 +10113,12 @@ Terminal::emit_pending_signals() +@@ -10063,6 +10063,12 @@ Terminal::emit_pending_signals() g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); } @@ -879,24 +983,27 @@ index 01b44e23..877fe93d 100644 } diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 2b277e05..1e926166 100644 +index 062b6694..ed08880d 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -110,10 +110,11 @@ struct _VteTerminalClass { +@@ -109,14 +109,9 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); + void (*shell_precmd)(VteTerminal* terminal); void (*shell_preexec)(VteTerminal* terminal); - /* Padding for future expansion. */ -- gpointer padding[14]; -+ gpointer padding[13]; +-#if _VTE_GTK == 3 +- /* Compatibility padding due to fedora patches intruding on our ABI */ +- /*< private >*/ +- gpointer _extra_padding[1]; +-#endif /* _VTE_GTK == 3 */ +- + /* Add new vfuncs here, and subtract from the padding below. */ - // FIXMEgtk4 use class private data instead - VteTerminalClassPrivate *priv; + /* Padding for future expansion. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 22b6412b..4cc1b939 100644 +index a4d51bfb..7020c2af 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -1249,6 +1249,7 @@ vte_terminal_class_init(VteTerminalClass *klass) @@ -944,10 +1051,10 @@ index bf85bdf4..cee56b65 100644 SIGNAL_NOTIFICATION_RECEIVED, SIGNAL_WINDOW_TITLE_CHANGED, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 041a9a81..5c1a5e50 100644 +index b4f1b4c9..eabc0062 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -683,6 +683,7 @@ public: +@@ -680,6 +680,7 @@ public: CWF = 1u << 2, NOTIFICATION = 1u << 3, SHELL_PREEXEC = 1u << 4, @@ -956,7 +1063,7 @@ index 041a9a81..5c1a5e50 100644 unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index 84341cda..35eff3dd 100644 +index dbc6276f..4de2a6f1 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc @@ -1402,7 +1402,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, @@ -971,13 +1078,13 @@ index 84341cda..35eff3dd 100644 } } -- -2.33.1 +2.35.1 -From 92f19ab6d981507e6d348c45802701e7cd8b0503 Mon Sep 17 00:00:00 2001 +From 5a57ad11947fbffc2c70a46e4e99941fc9e7b22a Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 -Subject: [PATCH 09/11] Test the shell-precmd signal +Subject: [PATCH 10/12] Test the shell-precmd signal https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 @@ -987,7 +1094,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 2 files changed, 13 insertions(+) diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 3975b988..ff5fb5df 100644 +index cc30f9ad..ecc4b769 100644 --- a/bindings/vala/app.vala +++ b/bindings/vala/app.vala @@ -310,6 +310,7 @@ class Window : Gtk.ApplicationWindow @@ -1011,10 +1118,10 @@ index 3975b988..ff5fb5df 100644 { print("[shell] executing command\n"); diff --git a/src/app/app.cc b/src/app/app.cc -index 002db773..dde27c9a 100644 +index 33a9481e..d30f8bd7 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2216,6 +2216,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2220,6 +2220,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -1027,7 +1134,7 @@ index 002db773..dde27c9a 100644 static void shell_preexec_cb(VteTerminal *terminal) { -@@ -2519,6 +2525,7 @@ vteapp_window_constructed(GObject *object) +@@ -2523,6 +2529,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -1036,13 +1143,13 @@ index 002db773..dde27c9a 100644 /* Settings */ -- -2.33.1 +2.35.1 -From 66afaa0b1eae0d55264068aadf689cd2d23d00a3 Mon Sep 17 00:00:00 2001 +From 5626cd2154d3c8ce63f679d876468ca776cc2279 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 -Subject: [PATCH 10/11] Support tracking the active container inside the +Subject: [PATCH 11/12] Support tracking the active container inside the terminal Add sequences @@ -1081,10 +1188,10 @@ agreed upon across multiple different terminal emulators [1]. 6 files changed, 193 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index 172174e0..d32e8eb7 100644 +index e8a344ee..a3ca5108 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10132,6 +10132,14 @@ Terminal::emit_pending_signals() +@@ -10082,6 +10082,14 @@ Terminal::emit_pending_signals() m_window_title_pending.clear(); } @@ -1100,7 +1207,7 @@ index 172174e0..d32e8eb7 100644 if (m_current_directory_uri != m_current_directory_uri_pending) { m_current_directory_uri.swap(m_current_directory_uri_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 1e926166..f81133e4 100644 +index ed08880d..d25eb93a 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -511,6 +511,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT @@ -1115,7 +1222,7 @@ index 1e926166..f81133e4 100644 _VTE_PUBLIC const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 4cc1b939..4544d9a0 100644 +index 7020c2af..2ee5b029 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -942,6 +942,12 @@ try @@ -1159,7 +1266,7 @@ index 4cc1b939..4544d9a0 100644 /** * VteTerminal:current-directory-uri: * -@@ -4869,6 +4896,56 @@ catch (...) +@@ -4929,6 +4956,56 @@ catch (...) return -1; } @@ -1230,7 +1337,7 @@ index cee56b65..e41f2f3a 100644 PROP_CURRENT_FILE_URI, PROP_DELETE_BINDING, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 5c1a5e50..f3821475 100644 +index eabc0062..dcb6a6fc 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh @@ -59,6 +59,7 @@ @@ -1260,7 +1367,7 @@ index 5c1a5e50..f3821475 100644 typedef struct _VtePaletteColor { struct { vte::color::rgb color; -@@ -664,6 +677,8 @@ public: +@@ -661,6 +674,8 @@ public: gboolean m_cursor_moved_pending; gboolean m_contents_changed_pending; @@ -1269,7 +1376,7 @@ index 5c1a5e50..f3821475 100644 /* desktop notification */ std::string m_notification_summary; std::string m_notification_body; -@@ -684,6 +699,7 @@ public: +@@ -681,6 +696,7 @@ public: NOTIFICATION = 1u << 3, SHELL_PREEXEC = 1u << 4, SHELL_PRECMD = 1u << 5, @@ -1278,7 +1385,7 @@ index 5c1a5e50..f3821475 100644 unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index 35eff3dd..d0f206be 100644 +index 4de2a6f1..18c0d89c 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc @@ -19,10 +19,14 @@ @@ -1386,13 +1493,13 @@ index 35eff3dd..d0f206be 100644 ++token; -- -2.33.1 +2.35.1 -From 70c33c909b2ded3536a0f318c503df27bbd94722 Mon Sep 17 00:00:00 2001 +From 00055475b4238ed9089faf745ba56e652f97bbc3 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 -Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region +Subject: [PATCH 12/12] Revert "widget: Limit select-all to the writable region not including the scrollback" ... as decided by Fedora Workstation WG. @@ -1405,10 +1512,10 @@ This reverts commit 73713ec0644e232fb740170e399282be778d97f9. 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index d32e8eb7..aa246e5e 100644 +index a3ca5108..1834b090 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -6555,10 +6555,7 @@ Terminal::maybe_end_selection() +@@ -6497,10 +6497,7 @@ Terminal::maybe_end_selection() /* * Terminal::select_all: * @@ -1420,7 +1527,7 @@ index d32e8eb7..aa246e5e 100644 */ void Terminal::select_all() -@@ -6567,8 +6564,8 @@ Terminal::select_all() +@@ -6509,8 +6506,8 @@ Terminal::select_all() m_selecting_had_delta = TRUE; @@ -1432,5 +1539,5 @@ index d32e8eb7..aa246e5e 100644 _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); -- -2.33.1 +2.35.1 diff --git a/vte291.spec b/vte291.spec index b00fd92..fe71e9f 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,22 +10,20 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.66.2 -Release: 2%{?dist} +Version: 0.67.90 +Release: 1%{?dist} Summary: Terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources License: LGPLv3+ and MIT URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.66/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.67/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 # https://pagure.io/fedora-workstation/issue/216 Patch0: vte291-cntnr-precmd-preexec-scroll.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=2047106 -Patch1: vte291-0.66.2-vala-accessibility.patch BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -133,6 +131,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Thu Feb 17 2022 David King - 0.67.90-1 +- Update to 0.67.90 + * Thu Jan 27 2022 David King - 0.66.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 80f531b220afc73b1d36ff10546993d50c22895b Mon Sep 17 00:00:00 2001 From: David King Date: Sun, 27 Mar 2022 19:28:32 +0100 Subject: [PATCH 024/102] Update to 0.68.0 --- .gitignore | 1 + sources | 2 +- vte291-cntnr-precmd-preexec-scroll.patch | 144 ++++------------------- vte291.spec | 7 +- 4 files changed, 29 insertions(+), 125 deletions(-) diff --git a/.gitignore b/.gitignore index 1eb86d2..97ac8c9 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,4 @@ /vte-0.66.1.tar.bz2 /vte-0.66.2.tar.xz /vte-0.67.90.tar.xz +/vte-0.68.0.tar.bz2 diff --git a/sources b/sources index 620f98b..0fb9898 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.67.90.tar.xz) = 867a3dfe9300a7ff691185e72195e3550c29d52022dc87428036d69f36710747ba2d76f26f989a9ed9b5c18ddb30464f4d42041e06264154143684ffb6949c10 +SHA512 (vte-0.68.0.tar.bz2) = 785df7261b5075f166e59de7d3535b381564715ce65efd4837a130e153528691b610fc6160c00f0f17008f5f4ee94c23350d9a477b4b1d58da6ace083e5caae1 diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index 6032d7a..bb93ced 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,107 +1,7 @@ -From e723a6fa96bc50effbd046a2c2419cc51b3cc8c1 Mon Sep 17 00:00:00 2001 -From: Christian Persch -Date: Sat, 12 Feb 2022 21:10:08 +0100 -Subject: [PATCH 01/12] Revert "emulation: Support XTVERSION sequence" - -This reverts commit 0718a9a7f9300b2526eddb0fc74e25eef34795ba. - -Issue #235 shows commiting this was premature and there's more discussion needed. ---- - src/parser-reply.hh | 1 - - src/parser-seq.py | 2 -- - src/vteseq.cc | 32 ++------------------------------ - 3 files changed, 2 insertions(+), 33 deletions(-) - -diff --git a/src/parser-reply.hh b/src/parser-reply.hh -index c9046b1a..1ba3022a 100644 ---- a/src/parser-reply.hh -+++ b/src/parser-reply.hh -@@ -57,7 +57,6 @@ _VTE_REPLY(DECCTR, DCS, 's', NONE, CASH, _VTE_REPLY_PARAMS({2})) /* color - _VTE_REPLY(DECAUPSS, DCS, 'u', NONE, BANG, ) /* assign user preferred supplemental set */ - _VTE_REPLY(DECCIR, DCS, 'u', NONE, CASH, _VTE_REPLY_PARAMS({1})) /* cursor information report */ - _VTE_REPLY(DECRPTUI, DCS, '|', NONE, BANG, _VTE_REPLY_STRING("7E565445") /* "~VTE" */) /* report terminal unit ID */ --_VTE_REPLY(XTERM_DSR, DCS, '|', GT, NONE, ) /* xterm terminal version report */ - _VTE_REPLY(DECRPFK, DCS, '}', NONE, DQUOTE,) /* report function key */ - _VTE_REPLY(DECCKSR, DCS, '~', NONE, BANG, ) /* memory checksum report */ - _VTE_REPLY(DECRPAK, DCS, '~', NONE, DQUOTE,) /* report all modifiers/alphanumeric key */ -diff --git a/src/parser-seq.py b/src/parser-seq.py -index c484c0ac..8692b147 100755 ---- a/src/parser-seq.py -+++ b/src/parser-seq.py -@@ -756,8 +756,6 @@ sequences = [ - comment='select terminal id'), - seq_CSI('DECCRTST', 'q', intermediates=(Intermediate.MINUS,), flags=Flags.NOP, - comment='CRT saver time'), -- seq_CSI('XTERM_VERSION', 'q', pintro=(ParameterIntro.GT,), -- comment='request xterm version report'), - seq_CSI('DECSTBM', 'r', - comment='set top and bottom margins'), - seq_CSI('DECSKCV', 'r', intermediates=(Intermediate.SPACE,), flags=Flags.NOP, -diff --git a/src/vteseq.cc b/src/vteseq.cc -index 007ddb69..874d2405 100644 ---- a/src/vteseq.cc -+++ b/src/vteseq.cc -@@ -69,11 +69,6 @@ enum { - VTE_SGR_COLOR_SPEC_LEGACY = 5 - }; - --inline constexpr int firmware_version() noexcept --{ -- return (VTE_MAJOR_VERSION * 100 + VTE_MINOR_VERSION) * 100 + VTE_MICRO_VERSION; --} -- - void - vte::parser::Sequence::print() const noexcept - { -@@ -2410,7 +2405,8 @@ Terminal::DA2(vte::parser::Sequence const& seq) - if (seq.collect1(0, 0) != 0) - return; - -- reply(seq, VTE_REPLY_DECDA2R, {65, firmware_version(), 1}); -+ int const version = (VTE_MAJOR_VERSION * 100 + VTE_MINOR_VERSION) * 100 + VTE_MICRO_VERSION; -+ reply(seq, VTE_REPLY_DECDA2R, {65, version, 1}); - } - - void -@@ -8848,30 +8844,6 @@ Terminal::XTERM_STCAP(vte::parser::Sequence const& seq) - */ - } - --void --Terminal::XTERM_VERSION(vte::parser::Sequence const& seq) --{ -- /* -- * XTERM_VERSION - xterm request version report -- * -- * Returns the xterm name and version as XTERM_DSR. -- * -- * Arguments: -- * args[0]: select function -- * 0: report xterm name and version -- * -- * Defaults: -- * args[0]: no defaults -- * -- * References: XTERM -- */ -- -- if (seq.collect1(0) != 0) -- return; -- -- reply(seq, VTE_REPLY_XTERM_DSR, {}, "VTE(%d)", firmware_version()); --} -- - void - Terminal::XTERM_WM(vte::parser::Sequence const& seq) - { --- -2.35.1 - - -From 90c5ba23a1fca5553c453f07ec010700eb2c70f2 Mon Sep 17 00:00:00 2001 +From c809170f42582f3f02fbcc10e5157ebae9efd0ce Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 -Subject: [PATCH 02/12] Add sequences and signals for desktop notification +Subject: [PATCH 01/11] Add sequences and signals for desktop notification Add sequences OSC 777 ; notify ; SUMMARY ; BODY BEL @@ -317,10 +217,10 @@ index 874d2405..537e8e13 100644 2.35.1 -From 4f2b191321033a1ac5ee49f10bf7290b07dc0af1 Mon Sep 17 00:00:00 2001 +From 05a642746f1c3985ea204571e0179a1147dda1a9 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 -Subject: [PATCH 03/12] vte.sh: Emit OSC 777 from PROMPT_COMMAND +Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND For some reason, the three consecutive backslashes break the parsing. As Christian Persch suggested, replacing the double quotes with @@ -353,10 +253,10 @@ index 242d6c42..50242223 100644 2.35.1 -From 1481641c0596217b6ca7f73243a5c5048202e10b Mon Sep 17 00:00:00 2001 +From d0cca4421d0108b0f9e23ea03ea5e99f745646a6 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 -Subject: [PATCH 04/12] Test the notification-received signal +Subject: [PATCH 03/11] Test the notification-received signal --- bindings/vala/app.vala | 7 +++++++ @@ -420,10 +320,10 @@ index 3b7835aa..fc8220a5 100644 2.35.1 -From e86c937f6d8f03930d97b942a13df4acd9bef92a Mon Sep 17 00:00:00 2001 +From e87bc628fdecf7480c12b861ba3fb98b03abe4d9 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 -Subject: [PATCH 05/12] Add a property to configure the scroll speed +Subject: [PATCH 04/11] Add a property to configure the scroll speed By default, it is set to zero which gives the current behaviour of moving the buffer by a function of the number of visible rows. @@ -628,10 +528,10 @@ index 69a32276..d3e25179 100644 2.35.1 -From a1da65e5390c1dfdd201a29c912181712de2e9d6 Mon Sep 17 00:00:00 2001 +From f8a8d2adf1000720f269adb80473e8971bc51135 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 -Subject: [PATCH 06/12] Test the scroll-speed property +Subject: [PATCH 05/11] Test the scroll-speed property https://bugzilla.redhat.com/show_bug.cgi?id=1103380 --- @@ -701,10 +601,10 @@ index fc8220a5..c6f5cc0b 100644 2.35.1 -From f7fafa786a3b6e5568eefab7ad318594813aa4d5 Mon Sep 17 00:00:00 2001 +From 60d5670e793d2aa2ccda489e4e468bbc9c120908 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 -Subject: [PATCH 07/12] Support preexec notifications from an interactive shell +Subject: [PATCH 06/11] Support preexec notifications from an interactive shell Add sequences OSC 777 ; preexec BEL @@ -859,10 +759,10 @@ index 537e8e13..dbc6276f 100644 2.35.1 -From 9921679046106711276fe5304bc2d04b71553dec Mon Sep 17 00:00:00 2001 +From 9fe74c4f17f1fb708a90f22a64fd2b5f4aa794a9 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 -Subject: [PATCH 08/12] Test the shell-preexec signal +Subject: [PATCH 07/11] Test the shell-preexec signal https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 @@ -924,10 +824,10 @@ index c6f5cc0b..33a9481e 100644 2.35.1 -From 9a9c9b064447d50b0ebcd4c87284f68dc5414158 Mon Sep 17 00:00:00 2001 +From ed2a83fbf034f79f7c08e8d5e4eeaaea2599e484 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 -Subject: [PATCH 09/12] Support precmd notifications from an interactive shell +Subject: [PATCH 08/11] Support precmd notifications from an interactive shell Add sequences OSC 777 ; precmd BEL @@ -1081,10 +981,10 @@ index dbc6276f..4de2a6f1 100644 2.35.1 -From 5a57ad11947fbffc2c70a46e4e99941fc9e7b22a Mon Sep 17 00:00:00 2001 +From 2f3ea5834f7ae8c946724c3aef05964383088ec0 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 -Subject: [PATCH 10/12] Test the shell-precmd signal +Subject: [PATCH 09/11] Test the shell-precmd signal https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 @@ -1146,10 +1046,10 @@ index 33a9481e..d30f8bd7 100644 2.35.1 -From 5626cd2154d3c8ce63f679d876468ca776cc2279 Mon Sep 17 00:00:00 2001 +From 08d50a8599dad3ac60f54cb0aeeadb3ca26c214d Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 -Subject: [PATCH 11/12] Support tracking the active container inside the +Subject: [PATCH 10/11] Support tracking the active container inside the terminal Add sequences @@ -1496,10 +1396,10 @@ index 4de2a6f1..18c0d89c 100644 2.35.1 -From 00055475b4238ed9089faf745ba56e652f97bbc3 Mon Sep 17 00:00:00 2001 +From 62df90e5147c8be4e12bcf5ce99679c1fb2390d0 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 -Subject: [PATCH 12/12] Revert "widget: Limit select-all to the writable region +Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region not including the scrollback" ... as decided by Fedora Workstation WG. diff --git a/vte291.spec b/vte291.spec index fe71e9f..a0018e1 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,7 +10,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.67.90 +Version: 0.68.0 Release: 1%{?dist} Summary: Terminal emulator library @@ -18,7 +18,7 @@ Summary: Terminal emulator library License: LGPLv3+ and MIT URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.67/vte-%{version}.tar.xz +Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -131,6 +131,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sun Mar 27 2022 David King - 0.68.0-1 +- Update to 0.68.0 + * Thu Feb 17 2022 David King - 0.67.90-1 - Update to 0.67.90 From 0f8e4183bd3e52693a0dc8f09f5639fe8356889d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 12:08:14 +0000 Subject: [PATCH 025/102] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index a0018e1..322b5d4 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.68.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -131,6 +131,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 0.68.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sun Mar 27 2022 David King - 0.68.0-1 - Update to 0.68.0 From b77d31593f151510b5619bfe5defe0b7c68ce0da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Mon, 1 Aug 2022 15:12:48 +0200 Subject: [PATCH 026/102] Rebuilt for ICU 71.1 --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 322b5d4..a53e63c 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ Name: vte291 Version: 0.68.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -131,6 +131,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Aug 01 2022 Frantisek Zatloukal - 0.68.0-3 +- Rebuilt for ICU 71.1 + * Sat Jul 23 2022 Fedora Release Engineering - 0.68.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 6f115a7c46be20360021aa5557a565ec4ff9ffd3 Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 3 Aug 2022 15:59:03 +0100 Subject: [PATCH 027/102] Update to 0.69.90 --- .gitignore | 1 + sources | 2 +- vte291-0.69.90-fix-toml-docdir.patch | 35 +++ vte291-cntnr-precmd-preexec-scroll.patch | 351 ++++++++--------------- vte291.spec | 15 +- 5 files changed, 163 insertions(+), 241 deletions(-) create mode 100644 vte291-0.69.90-fix-toml-docdir.patch diff --git a/.gitignore b/.gitignore index 97ac8c9..74d0493 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,4 @@ /vte-0.66.2.tar.xz /vte-0.67.90.tar.xz /vte-0.68.0.tar.bz2 +/vte-0.69.90.tar.xz diff --git a/sources b/sources index 0fb9898..1916811 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.68.0.tar.bz2) = 785df7261b5075f166e59de7d3535b381564715ce65efd4837a130e153528691b610fc6160c00f0f17008f5f4ee94c23350d9a477b4b1d58da6ace083e5caae1 +SHA512 (vte-0.69.90.tar.xz) = fc5506cc6c089c1dd7cd6917318b338e8f374340ac73046856f5dd0c2d99b6cc9654a8b578b1137766ed35a5352b7a4a2865639e63add7d845ab99c3b7d385e6 diff --git a/vte291-0.69.90-fix-toml-docdir.patch b/vte291-0.69.90-fix-toml-docdir.patch new file mode 100644 index 0000000..5b82ddc --- /dev/null +++ b/vte291-0.69.90-fix-toml-docdir.patch @@ -0,0 +1,35 @@ +From 901558bf471299e483976770e062730f35c13414 Mon Sep 17 00:00:00 2001 +From: Jeremy Bicha +Date: Fri, 29 Jul 2022 22:23:50 +0200 +Subject: [PATCH] docs: Install toml file to subdir + +Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2570 +--- + doc/reference/meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/doc/reference/meson.build b/doc/reference/meson.build +index 3d98c7ae..beffb322 100644 +--- a/doc/reference/meson.build ++++ b/doc/reference/meson.build +@@ -32,7 +32,7 @@ if get_option('gtk3') + configuration: doc_conf, + input: 'vte-gtk3.toml.in', + install: true, +- install_dir: docdir, ++ install_dir: docdir / vte_gtk3_api_name, + output: vte_gtk3_api_name + '.toml', + ) + +@@ -67,7 +67,7 @@ if get_option('gtk4') + configuration: doc_conf, + input: 'vte-gtk4.toml.in', + install: true, +- install_dir: docdir, ++ install_dir: docdir / vte_gtk4_api_name, + output: vte_gtk4_api_name + '.toml', + ) + +-- +GitLab + diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index bb93ced..7443b38 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,4 +1,4 @@ -From c809170f42582f3f02fbcc10e5157ebae9efd0ce Mon Sep 17 00:00:00 2001 +From 22704d787b39e7f8d583a36d3a323854d43bebda Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 01/11] Add sequences and signals for desktop notification @@ -36,10 +36,10 @@ index 241128c3..4412cf3d 100644 VOID:STRING,UINT VOID:UINT,UINT diff --git a/src/vte.cc b/src/vte.cc -index 8b75883f..05cc5589 100644 +index 00cd243b..2c4a66b5 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10032,6 +10032,14 @@ Terminal::emit_pending_signals() +@@ -10281,6 +10281,14 @@ Terminal::emit_pending_signals() emit_adjustment_changed(); @@ -55,7 +55,7 @@ index 8b75883f..05cc5589 100644 if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 41f153d0..1e9a737a 100644 +index 6f8a7751..0fdfce1e 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -108,10 +108,12 @@ struct _VteTerminalClass { @@ -73,10 +73,10 @@ index 41f153d0..1e9a737a 100644 /* Add new vfuncs here, and subtract from the padding below. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 05b82294..a09a2f75 100644 +index 034c023b..778b69b2 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1242,6 +1242,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1274,6 +1274,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->child_exited = NULL; klass->encoding_changed = NULL; klass->char_size_changed = NULL; @@ -84,7 +84,7 @@ index 05b82294..a09a2f75 100644 klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1325,6 +1326,26 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1357,6 +1358,26 @@ vte_terminal_class_init(VteTerminalClass *klass) G_OBJECT_CLASS_TYPE(klass), g_cclosure_marshal_VOID__INTv); @@ -112,7 +112,7 @@ index 05b82294..a09a2f75 100644 * VteTerminal::window-title-changed: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 6b7a1ea2..8ba10395 100644 +index 778b555a..67c456b5 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -52,6 +52,7 @@ enum { @@ -124,10 +124,10 @@ index 6b7a1ea2..8ba10395 100644 LAST_SIGNAL }; diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index eb95ad68..69a32276 100644 +index 5037096d..1e8a27f6 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -660,6 +660,10 @@ public: +@@ -688,6 +688,10 @@ public: gboolean m_cursor_moved_pending; gboolean m_contents_changed_pending; @@ -138,7 +138,7 @@ index eb95ad68..69a32276 100644 std::string m_window_title{}; std::string m_current_directory_uri{}; std::string m_current_file_uri{}; -@@ -673,6 +677,7 @@ public: +@@ -701,6 +705,7 @@ public: TITLE = 1u << 0, CWD = 1u << 1, CWF = 1u << 2, @@ -146,7 +146,7 @@ index eb95ad68..69a32276 100644 }; unsigned m_pending_changes{0}; -@@ -1488,6 +1493,9 @@ public: +@@ -1539,6 +1544,9 @@ public: int osc) noexcept; /* OSC handlers */ @@ -157,10 +157,10 @@ index eb95ad68..69a32276 100644 vte::parser::StringTokeniser::const_iterator& token, vte::parser::StringTokeniser::const_iterator const& endtoken, diff --git a/src/vteseq.cc b/src/vteseq.cc -index 874d2405..537e8e13 100644 +index 9efde087..772ba4f3 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1376,6 +1376,33 @@ Terminal::delete_lines(vte::grid::row_t param) +@@ -1408,6 +1408,33 @@ Terminal::delete_lines(vte::grid::row_t param) m_text_deleted_flag = TRUE; } @@ -194,7 +194,7 @@ index 874d2405..537e8e13 100644 bool Terminal::get_osc_color_index(int osc, int value, -@@ -6541,6 +6568,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6687,6 +6714,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE); break; @@ -205,7 +205,7 @@ index 874d2405..537e8e13 100644 case VTE_OSC_XTERM_SET_ICON_TITLE: case VTE_OSC_XTERM_SET_XPROPERTY: case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG: -@@ -6582,7 +6613,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6728,7 +6759,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC: case VTE_OSC_URXVT_VIEW_UP: case VTE_OSC_URXVT_VIEW_DOWN: @@ -214,10 +214,10 @@ index 874d2405..537e8e13 100644 default: break; -- -2.35.1 +2.37.1 -From 05a642746f1c3985ea204571e0179a1147dda1a9 Mon Sep 17 00:00:00 2001 +From b885c59413ac8f64891ced008767efc180d8d90a Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND @@ -250,49 +250,23 @@ index 242d6c42..50242223 100644 } -- -2.35.1 +2.37.1 -From d0cca4421d0108b0f9e23ea03ea5e99f745646a6 Mon Sep 17 00:00:00 2001 +From ce224baf4eac101842a05e848874608bda2dd715 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 Subject: [PATCH 03/11] Test the notification-received signal --- - bindings/vala/app.vala | 7 +++++++ - src/app/app.cc | 10 ++++++++++ - 2 files changed, 17 insertions(+) + src/app/app.cc | 10 ++++++++++ + 1 file changed, 10 insertions(+) -diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 4bcb5804..06546440 100644 ---- a/bindings/vala/app.vala -+++ b/bindings/vala/app.vala -@@ -309,6 +309,8 @@ class Window : Gtk.ApplicationWindow - if (Options.object_notifications) - terminal.notify.connect(notify_cb); - -+ terminal.notification_received.connect(notification_received_cb); -+ - /* Settings */ - if (Options.no_double_buffer) - terminal.set_double_buffered(false); -@@ -780,6 +782,11 @@ class Window : Gtk.ApplicationWindow - set_title(terminal.get_window_title()); - } - -+ private void notification_received_cb(Vte.Terminal terminal, string summary, string? body) -+ { -+ print ("[%s]: %s\n", summary, body); -+ } -+ - } /* class Window */ - - class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index 3b7835aa..fc8220a5 100644 +index 9d53f274..3c666816 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2209,6 +2209,14 @@ window_window_title_changed_cb(VteTerminal* terminal, +@@ -2245,6 +2245,14 @@ window_window_title_changed_cb(VteTerminal* terminal, gtk_window_set_title(GTK_WINDOW(window), title && title[0] ? title : "Terminal"); } @@ -307,7 +281,7 @@ index 3b7835aa..fc8220a5 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2505,6 +2513,8 @@ vteapp_window_constructed(GObject *object) +@@ -2541,6 +2549,8 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); @@ -317,10 +291,10 @@ index 3b7835aa..fc8220a5 100644 #if VTE_GTK == 3 if (options.no_double_buffer) { -- -2.35.1 +2.37.1 -From e87bc628fdecf7480c12b861ba3fb98b03abe4d9 Mon Sep 17 00:00:00 2001 +From 574e63dbad4c0ae09cf9ff4fff2fdc00de49e9a3 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 Subject: [PATCH 04/11] Add a property to configure the scroll speed @@ -330,31 +304,18 @@ moving the buffer by a function of the number of visible rows. https://bugzilla.redhat.com/show_bug.cgi?id=1103380 --- - doc/reference/vte-sections.txt.in | 1 + - src/vte.cc | 19 +++++++++++- - src/vte/vteterminal.h | 4 +++ - src/vtegtk.cc | 51 +++++++++++++++++++++++++++++++ - src/vtegtk.hh | 1 + - src/vteinternal.hh | 2 ++ - 6 files changed, 77 insertions(+), 1 deletion(-) + src/vte.cc | 19 +++++++++++++++- + src/vte/vteterminal.h | 4 ++++ + src/vtegtk.cc | 51 +++++++++++++++++++++++++++++++++++++++++++ + src/vtegtk.hh | 1 + + src/vteinternal.hh | 2 ++ + 5 files changed, 76 insertions(+), 1 deletion(-) -diff --git a/doc/reference/vte-sections.txt.in b/doc/reference/vte-sections.txt.in -index 283dd056..64907389 100644 ---- a/doc/reference/vte-sections.txt.in -+++ b/doc/reference/vte-sections.txt.in -@@ -58,6 +58,7 @@ vte_terminal_get_cursor_blink_mode - vte_terminal_set_cursor_blink_mode - vte_terminal_get_text_blink_mode - vte_terminal_set_text_blink_mode -+vte_terminal_set_scroll_speed - vte_terminal_set_scrollback_lines - vte_terminal_get_scrollback_lines - vte_terminal_set_font diff --git a/src/vte.cc b/src/vte.cc -index 05cc5589..a4e6069d 100644 +index 2c4a66b5..93fc18d2 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -9239,6 +9239,7 @@ vte_cairo_get_clip_region(cairo_t *cr) +@@ -9455,6 +9455,7 @@ vte_cairo_get_clip_region(cairo_t *cr) bool Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) { @@ -362,7 +323,7 @@ index 05cc5589..a4e6069d 100644 gdouble v; gint cnt, i; int button; -@@ -9273,7 +9274,13 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) +@@ -9489,7 +9490,13 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) return true; } @@ -377,7 +338,7 @@ index 05cc5589..a4e6069d 100644 _vte_debug_print(VTE_DEBUG_EVENTS, "Scroll speed is %d lines per non-smooth scroll unit\n", (int) v); -@@ -9583,6 +9590,16 @@ Terminal::decscusr_cursor_shape() const noexcept +@@ -9799,6 +9806,16 @@ Terminal::decscusr_cursor_shape() const noexcept } } @@ -395,7 +356,7 @@ index 05cc5589..a4e6069d 100644 Terminal::set_scrollback_lines(long lines) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 1e9a737a..b63967a3 100644 +index 0fdfce1e..c1240e8a 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -330,6 +330,10 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, @@ -410,7 +371,7 @@ index 1e9a737a..b63967a3 100644 _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index a09a2f75..ab1de923 100644 +index 778b69b2..3992766f 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -993,6 +993,9 @@ try @@ -423,7 +384,7 @@ index a09a2f75..ab1de923 100644 case PROP_SCROLLBACK_LINES: g_value_set_uint (value, vte_terminal_get_scrollback_lines(terminal)); break; -@@ -1114,6 +1117,9 @@ try +@@ -1130,6 +1133,9 @@ try case PROP_REWRAP_ON_RESIZE: vte_terminal_set_rewrap_on_resize (terminal, g_value_get_boolean (value)); break; @@ -433,7 +394,7 @@ index a09a2f75..ab1de923 100644 case PROP_SCROLLBACK_LINES: vte_terminal_set_scrollback_lines (terminal, g_value_get_uint (value)); break; -@@ -2210,6 +2216,21 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2246,6 +2252,21 @@ vte_terminal_class_init(VteTerminalClass *klass) TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -455,7 +416,7 @@ index a09a2f75..ab1de923 100644 /** * VteTerminal:scrollback-lines: * -@@ -5726,6 +5747,36 @@ catch (...) +@@ -5851,6 +5872,36 @@ catch (...) return -1; } @@ -493,7 +454,7 @@ index a09a2f75..ab1de923 100644 * vte_terminal_set_scrollback_lines: * @terminal: a #VteTerminal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 8ba10395..f6cd891b 100644 +index 67c456b5..64ff8be8 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -86,6 +86,7 @@ enum { @@ -505,10 +466,10 @@ index 8ba10395..f6cd891b 100644 PROP_SCROLL_ON_KEYSTROKE, PROP_SCROLL_ON_OUTPUT, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 69a32276..d3e25179 100644 +index 1e8a27f6..0e5a8ace 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -426,6 +426,7 @@ public: +@@ -439,6 +439,7 @@ public: bool m_fallback_scrolling{true}; bool m_scroll_on_output{false}; bool m_scroll_on_keystroke{true}; @@ -516,7 +477,7 @@ index 69a32276..d3e25179 100644 vte::grid::row_t m_scrollback_lines{0}; inline auto scroll_limit_lower() const noexcept -@@ -1363,6 +1364,7 @@ public: +@@ -1412,6 +1413,7 @@ public: bool set_input_enabled(bool enabled); bool set_mouse_autohide(bool autohide); bool set_rewrap_on_resize(bool rewrap); @@ -525,54 +486,24 @@ index 69a32276..d3e25179 100644 bool set_fallback_scrolling(bool set); auto fallback_scrolling() const noexcept { return m_fallback_scrolling; } -- -2.35.1 +2.37.1 -From f8a8d2adf1000720f269adb80473e8971bc51135 Mon Sep 17 00:00:00 2001 +From 57e1446aa0085ecb194ef91b6a54a67f6005230c Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 Subject: [PATCH 05/11] Test the scroll-speed property https://bugzilla.redhat.com/show_bug.cgi?id=1103380 --- - bindings/vala/app.vala | 4 ++++ - src/app/app.cc | 4 ++++ - 2 files changed, 8 insertions(+) + src/app/app.cc | 4 ++++ + 1 file changed, 4 insertions(+) -diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 06546440..552a702d 100644 ---- a/bindings/vala/app.vala -+++ b/bindings/vala/app.vala -@@ -335,6 +335,7 @@ class Window : Gtk.ApplicationWindow - terminal.set_rewrap_on_resize(!Options.no_rewrap); - terminal.set_scroll_on_output(false); - terminal.set_scroll_on_keystroke(true); -+ terminal.set_scroll_speed(Options.scroll_speed); - terminal.set_scrollback_lines(Options.scrollback_lines); - - /* Style */ -@@ -857,6 +858,7 @@ class App : Gtk.Application - public static bool object_notifications = false; - public static string? output_filename = null; - public static bool reverse = false; -+ public static uint scroll_speed = 0; - public static int scrollback_lines = 512; - public static int transparency_percent = 0; - public static bool version = false; -@@ -1050,6 +1052,8 @@ class App : Gtk.Application - "Save terminal contents to file at exit", null }, - { "reverse", 0, 0, OptionArg.NONE, ref reverse, - "Reverse foreground/background colors", null }, -+ { "scroll-speed", 0, 0, OptionArg.INT, ref scroll_speed, -+ "Specify the scroll speed", null }, - { "scrollback-lines", 'n', 0, OptionArg.INT, ref scrollback_lines, - "Specify the number of scrollback-lines", null }, - { "transparent", 'T', 0, OptionArg.INT, ref transparency_percent, diff --git a/src/app/app.cc b/src/app/app.cc -index fc8220a5..c6f5cc0b 100644 +index 3c666816..2c2e8bde 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -118,6 +118,7 @@ public: +@@ -119,6 +119,7 @@ public: int verbosity{0}; double cell_height_scale{1.0}; double cell_width_scale{1.0}; @@ -580,7 +511,7 @@ index fc8220a5..c6f5cc0b 100644 VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM}; VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK}; VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS}; -@@ -620,6 +621,8 @@ public: +@@ -647,6 +648,8 @@ public: "Reverse foreground/background colors", nullptr }, { "require-systemd-scope", 0, 0, G_OPTION_ARG_NONE, &require_systemd_scope, "Require use of a systemd user scope", nullptr }, @@ -589,7 +520,7 @@ index fc8220a5..c6f5cc0b 100644 { "scroll-unit-is-pixels", 0, 0, G_OPTION_ARG_NONE, &scroll_unit_is_pixels, "Use pixels as scroll unit", nullptr }, { "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines, -@@ -2549,6 +2552,7 @@ vteapp_window_constructed(GObject *object) +@@ -2586,6 +2589,7 @@ vteapp_window_constructed(GObject *object) vte_terminal_set_rewrap_on_resize(window->terminal, !options.no_rewrap); vte_terminal_set_scroll_on_output(window->terminal, false); vte_terminal_set_scroll_on_keystroke(window->terminal, true); @@ -598,10 +529,10 @@ index fc8220a5..c6f5cc0b 100644 vte_terminal_set_scrollback_lines(window->terminal, options.scrollback_lines); vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); -- -2.35.1 +2.37.1 -From 60d5670e793d2aa2ccda489e4e468bbc9c120908 Mon Sep 17 00:00:00 2001 +From 6909335767cfbdee9a8e05949eef21f9cedffe20 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 06/11] Support preexec notifications from an interactive shell @@ -630,10 +561,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index a4e6069d..6d8ab2bb 100644 +index 93fc18d2..77c50558 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10057,6 +10057,12 @@ Terminal::emit_pending_signals() +@@ -10306,6 +10306,12 @@ Terminal::emit_pending_signals() m_notification_body.c_str()); } @@ -663,7 +594,7 @@ index 50242223..01b44e23 100644 elif [[ -n "${ZSH_VERSION:-}" ]]; then diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index b63967a3..062b6694 100644 +index c1240e8a..eba96927 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -109,11 +109,12 @@ struct _VteTerminalClass { @@ -681,10 +612,10 @@ index b63967a3..062b6694 100644 /* Add new vfuncs here, and subtract from the padding below. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index ab1de923..a4d51bfb 100644 +index 3992766f..4ef646d7 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1249,6 +1249,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1281,6 +1281,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->encoding_changed = NULL; klass->char_size_changed = NULL; klass->notification_received = NULL; @@ -692,7 +623,7 @@ index ab1de923..a4d51bfb 100644 klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1352,6 +1353,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1384,6 +1385,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -717,7 +648,7 @@ index ab1de923..a4d51bfb 100644 * VteTerminal::window-title-changed: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index f6cd891b..bf85bdf4 100644 +index 64ff8be8..179222a1 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -52,6 +52,7 @@ enum { @@ -729,10 +660,10 @@ index f6cd891b..bf85bdf4 100644 SIGNAL_WINDOW_TITLE_CHANGED, LAST_SIGNAL diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index d3e25179..b4f1b4c9 100644 +index 0e5a8ace..11965778 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -679,6 +679,7 @@ public: +@@ -707,6 +707,7 @@ public: CWD = 1u << 1, CWF = 1u << 2, NOTIFICATION = 1u << 3, @@ -741,10 +672,10 @@ index d3e25179..b4f1b4c9 100644 unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index 537e8e13..dbc6276f 100644 +index 772ba4f3..76b9329e 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1401,6 +1401,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1433,6 +1433,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, m_notification_body = *token; return; } @@ -756,10 +687,10 @@ index 537e8e13..dbc6276f 100644 bool -- -2.35.1 +2.37.1 -From 9fe74c4f17f1fb708a90f22a64fd2b5f4aa794a9 Mon Sep 17 00:00:00 2001 +From 39c75a48973425aad1bf25f0181d49600c7d8119 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 Subject: [PATCH 07/11] Test the shell-preexec signal @@ -767,39 +698,14 @@ Subject: [PATCH 07/11] Test the shell-preexec signal https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 --- - bindings/vala/app.vala | 6 ++++++ - src/app/app.cc | 7 +++++++ - 2 files changed, 13 insertions(+) + src/app/app.cc | 7 +++++++ + 1 file changed, 7 insertions(+) -diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index 552a702d..cc30f9ad 100644 ---- a/bindings/vala/app.vala -+++ b/bindings/vala/app.vala -@@ -310,6 +310,7 @@ class Window : Gtk.ApplicationWindow - terminal.notify.connect(notify_cb); - - terminal.notification_received.connect(notification_received_cb); -+ terminal.shell_preexec.connect(shell_preexec_cb); - - /* Settings */ - if (Options.no_double_buffer) -@@ -788,6 +789,11 @@ class Window : Gtk.ApplicationWindow - print ("[%s]: %s\n", summary, body); - } - -+ private void shell_preexec_cb(Vte.Terminal terminal) -+ { -+ print("[shell] executing command\n"); -+ } -+ - } /* class Window */ - - class App : Gtk.Application diff --git a/src/app/app.cc b/src/app/app.cc -index c6f5cc0b..33a9481e 100644 +index 2c2e8bde..a66b56f0 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2220,6 +2220,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2256,6 +2256,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -812,7 +718,7 @@ index c6f5cc0b..33a9481e 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2517,6 +2523,7 @@ vteapp_window_constructed(GObject *object) +@@ -2553,6 +2559,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -821,10 +727,10 @@ index c6f5cc0b..33a9481e 100644 /* Settings */ #if VTE_GTK == 3 -- -2.35.1 +2.37.1 -From ed2a83fbf034f79f7c08e8d5e4eeaaea2599e484 Mon Sep 17 00:00:00 2001 +From bfb447be5a97cda7523719ab901c1ea6b0293a6b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 08/11] Support precmd notifications from an interactive shell @@ -853,10 +759,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 6d8ab2bb..e8a344ee 100644 +index 77c50558..604890e3 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10063,6 +10063,12 @@ Terminal::emit_pending_signals() +@@ -10312,6 +10312,12 @@ Terminal::emit_pending_signals() g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); } @@ -883,7 +789,7 @@ index 01b44e23..877fe93d 100644 } diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 062b6694..ed08880d 100644 +index eba96927..c49f217e 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -109,14 +109,9 @@ struct _VteTerminalClass { @@ -903,10 +809,10 @@ index 062b6694..ed08880d 100644 /* Padding for future expansion. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index a4d51bfb..7020c2af 100644 +index 4ef646d7..54ed6fc1 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1249,6 +1249,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1281,6 +1281,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->encoding_changed = NULL; klass->char_size_changed = NULL; klass->notification_received = NULL; @@ -914,7 +820,7 @@ index a4d51bfb..7020c2af 100644 klass->shell_preexec = NULL; klass->window_title_changed = NULL; klass->icon_title_changed = NULL; -@@ -1353,6 +1354,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1385,6 +1386,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -939,7 +845,7 @@ index a4d51bfb..7020c2af 100644 * VteTerminal::shell-preexec: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index bf85bdf4..cee56b65 100644 +index 179222a1..c66aeda2 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -52,6 +52,7 @@ enum { @@ -951,10 +857,10 @@ index bf85bdf4..cee56b65 100644 SIGNAL_NOTIFICATION_RECEIVED, SIGNAL_WINDOW_TITLE_CHANGED, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index b4f1b4c9..eabc0062 100644 +index 11965778..d4a10935 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -680,6 +680,7 @@ public: +@@ -708,6 +708,7 @@ public: CWF = 1u << 2, NOTIFICATION = 1u << 3, SHELL_PREEXEC = 1u << 4, @@ -963,10 +869,10 @@ index b4f1b4c9..eabc0062 100644 unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index dbc6276f..4de2a6f1 100644 +index 76b9329e..fb958962 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1402,7 +1402,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1434,7 +1434,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, return; } @@ -978,10 +884,10 @@ index dbc6276f..4de2a6f1 100644 } } -- -2.35.1 +2.37.1 -From 2f3ea5834f7ae8c946724c3aef05964383088ec0 Mon Sep 17 00:00:00 2001 +From d84dd319c31ffdcfd73b08750228efba34e226fb Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 09/11] Test the shell-precmd signal @@ -989,39 +895,14 @@ Subject: [PATCH 09/11] Test the shell-precmd signal https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 --- - bindings/vala/app.vala | 6 ++++++ - src/app/app.cc | 7 +++++++ - 2 files changed, 13 insertions(+) + src/app/app.cc | 7 +++++++ + 1 file changed, 7 insertions(+) -diff --git a/bindings/vala/app.vala b/bindings/vala/app.vala -index cc30f9ad..ecc4b769 100644 ---- a/bindings/vala/app.vala -+++ b/bindings/vala/app.vala -@@ -310,6 +310,7 @@ class Window : Gtk.ApplicationWindow - terminal.notify.connect(notify_cb); - - terminal.notification_received.connect(notification_received_cb); -+ terminal.shell_precmd.connect(shell_precmd_cb); - terminal.shell_preexec.connect(shell_preexec_cb); - - /* Settings */ -@@ -789,6 +790,11 @@ class Window : Gtk.ApplicationWindow - print ("[%s]: %s\n", summary, body); - } - -+ private void shell_precmd_cb(Vte.Terminal terminal) -+ { -+ print("[shell] showing command prompt\n"); -+ } -+ - private void shell_preexec_cb(Vte.Terminal terminal) - { - print("[shell] executing command\n"); diff --git a/src/app/app.cc b/src/app/app.cc -index 33a9481e..d30f8bd7 100644 +index a66b56f0..9d02499b 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2220,6 +2220,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2256,6 +2256,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -1034,7 +915,7 @@ index 33a9481e..d30f8bd7 100644 static void shell_preexec_cb(VteTerminal *terminal) { -@@ -2523,6 +2529,7 @@ vteapp_window_constructed(GObject *object) +@@ -2559,6 +2565,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -1043,10 +924,10 @@ index 33a9481e..d30f8bd7 100644 /* Settings */ -- -2.35.1 +2.37.1 -From 08d50a8599dad3ac60f54cb0aeeadb3ca26c214d Mon Sep 17 00:00:00 2001 +From 691fece42c52662dcf53b4bf5360ca0d48822580 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 10/11] Support tracking the active container inside the @@ -1088,10 +969,10 @@ agreed upon across multiple different terminal emulators [1]. 6 files changed, 193 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index e8a344ee..a3ca5108 100644 +index 604890e3..fca21ddf 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10082,6 +10082,14 @@ Terminal::emit_pending_signals() +@@ -10331,6 +10331,14 @@ Terminal::emit_pending_signals() m_window_title_pending.clear(); } @@ -1107,10 +988,10 @@ index e8a344ee..a3ca5108 100644 if (m_current_directory_uri != m_current_directory_uri_pending) { m_current_directory_uri.swap(m_current_directory_uri_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index ed08880d..d25eb93a 100644 +index c49f217e..c490f157 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -511,6 +511,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT +@@ -514,6 +514,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT _VTE_PUBLIC const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); _VTE_PUBLIC @@ -1122,7 +1003,7 @@ index ed08880d..d25eb93a 100644 _VTE_PUBLIC const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 7020c2af..2ee5b029 100644 +index 54ed6fc1..b2ec8f40 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc @@ -942,6 +942,12 @@ try @@ -1138,7 +1019,7 @@ index 7020c2af..2ee5b029 100644 case PROP_CURRENT_DIRECTORY_URI: g_value_set_string (value, vte_terminal_get_current_directory_uri (terminal)); break; -@@ -2357,6 +2363,27 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2393,6 +2399,27 @@ vte_terminal_class_init(VteTerminalClass *klass) NULL, (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -1166,7 +1047,7 @@ index 7020c2af..2ee5b029 100644 /** * VteTerminal:current-directory-uri: * -@@ -4929,6 +4956,56 @@ catch (...) +@@ -5022,6 +5049,56 @@ catch (...) return -1; } @@ -1224,7 +1105,7 @@ index 7020c2af..2ee5b029 100644 * vte_terminal_get_current_directory_uri: * @terminal: a #VteTerminal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index cee56b65..e41f2f3a 100644 +index c66aeda2..cf572de4 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh @@ -72,6 +72,8 @@ enum { @@ -1237,7 +1118,7 @@ index cee56b65..e41f2f3a 100644 PROP_CURRENT_FILE_URI, PROP_DELETE_BINDING, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index eabc0062..dcb6a6fc 100644 +index d4a10935..0f219dc6 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh @@ -59,6 +59,7 @@ @@ -1248,7 +1129,7 @@ index eabc0062..dcb6a6fc 100644 #include #include #include -@@ -110,6 +111,18 @@ typedef enum _VteCharacterReplacement { +@@ -114,6 +115,18 @@ typedef enum _VteCharacterReplacement { VTE_CHARACTER_REPLACEMENT_LINE_DRAWING } VteCharacterReplacement; @@ -1267,7 +1148,7 @@ index eabc0062..dcb6a6fc 100644 typedef struct _VtePaletteColor { struct { vte::color::rgb color; -@@ -661,6 +674,8 @@ public: +@@ -689,6 +702,8 @@ public: gboolean m_cursor_moved_pending; gboolean m_contents_changed_pending; @@ -1276,7 +1157,7 @@ index eabc0062..dcb6a6fc 100644 /* desktop notification */ std::string m_notification_summary; std::string m_notification_body; -@@ -681,6 +696,7 @@ public: +@@ -709,6 +724,7 @@ public: NOTIFICATION = 1u << 3, SHELL_PREEXEC = 1u << 4, SHELL_PRECMD = 1u << 5, @@ -1285,7 +1166,7 @@ index eabc0062..dcb6a6fc 100644 unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index 4de2a6f1..18c0d89c 100644 +index fb958962..5b36dd9b 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc @@ -19,10 +19,14 @@ @@ -1303,7 +1184,7 @@ index 4de2a6f1..18c0d89c 100644 #ifdef HAVE_SYS_SYSLIMITS_H #include #endif -@@ -1384,6 +1388,88 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1416,6 +1420,88 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, if (token == endtoken) return; @@ -1393,10 +1274,10 @@ index 4de2a6f1..18c0d89c 100644 ++token; -- -2.35.1 +2.37.1 -From 62df90e5147c8be4e12bcf5ce99679c1fb2390d0 Mon Sep 17 00:00:00 2001 +From 09b7ad967e395ef95f3428982596a2d80a0097e1 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region @@ -1412,10 +1293,10 @@ This reverts commit 73713ec0644e232fb740170e399282be778d97f9. 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index a3ca5108..1834b090 100644 +index fca21ddf..eeb29eab 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -6497,10 +6497,7 @@ Terminal::maybe_end_selection() +@@ -6566,10 +6566,7 @@ Terminal::maybe_end_selection() /* * Terminal::select_all: * @@ -1427,7 +1308,7 @@ index a3ca5108..1834b090 100644 */ void Terminal::select_all() -@@ -6509,8 +6506,8 @@ Terminal::select_all() +@@ -6578,8 +6575,8 @@ Terminal::select_all() m_selecting_had_delta = TRUE; @@ -1439,5 +1320,5 @@ index a3ca5108..1834b090 100644 _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); -- -2.35.1 +2.37.1 diff --git a/vte291.spec b/vte291.spec index a53e63c..bba1a96 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,21 +10,23 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.68.0 -Release: 3%{?dist} +Version: 0.69.90 +Release: 1%{?dist} Summary: Terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources License: LGPLv3+ and MIT URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 +Source0: https://download.gnome.org/sources/vte/0.69/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 # https://pagure.io/fedora-workstation/issue/216 Patch0: vte291-cntnr-precmd-preexec-scroll.patch +Patch1: vte291-0.69.90-fix-toml-docdir.patch + BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} @@ -38,9 +40,9 @@ BuildRequires: pkgconfig(pango) >= %{pango_version} BuildRequires: pkgconfig(zlib) BuildRequires: gcc-c++ BuildRequires: gettext +BuildRequires: gi-docgen BuildRequires: gobject-introspection-devel BuildRequires: gperf -BuildRequires: gtk-doc BuildRequires: meson BuildRequires: systemd-rpm-macros BuildRequires: vala @@ -121,7 +123,7 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_libdir}/pkgconfig/vte-%{apiver}.pc %{_datadir}/gir-1.0/ %{_datadir}/glade/ -%doc %{_datadir}/gtk-doc/ +%doc %{_docdir}/vte-2.91/ %{_datadir}/vala/ %files -n vte-profile @@ -131,6 +133,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Aug 03 2022 David King - 0.69.90-1 +- Update to 0.69.90 + * Mon Aug 01 2022 Frantisek Zatloukal - 0.68.0-3 - Rebuilt for ICU 71.1 From 1730e3bf04db4ab73b964f182e634d02367a7f75 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 4 Aug 2022 12:42:15 +0100 Subject: [PATCH 028/102] Enable GTK4 support --- vte291.spec | 63 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 7 deletions(-) diff --git a/vte291.spec b/vte291.spec index bba1a96..041fa8d 100644 --- a/vte291.spec +++ b/vte291.spec @@ -4,6 +4,7 @@ %global glib2_version 2.52.0 %global gnutls_version 3.2.7 %global gtk3_version 3.24.22 +%global gtk4_version 4.0.1 %global icu_uc_version 4.8 %global libsystemd_version 220 %global pango_version 1.22.0 @@ -12,7 +13,7 @@ Name: vte291 Version: 0.69.90 Release: 1%{?dist} -Summary: Terminal emulator library +Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources License: LGPLv3+ and MIT @@ -33,6 +34,7 @@ BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gnutls) >= %{gnutls_version} BuildRequires: pkgconfig(gobject-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version} +BuildRequires: pkgconfig(gtk4) >= %{gtk4_version} BuildRequires: pkgconfig(icu-uc) >= %{icu_uc_version} BuildRequires: pkgconfig(libpcre2-8) >= %{pcre2_version} BuildRequires: pkgconfig(libsystemd) >= %{libsystemd_version} @@ -64,8 +66,21 @@ VTE is a library implementing a terminal emulator widget for GTK+. VTE is mainly used in gnome-terminal, but can also be used to embed a console/terminal in games, editors, IDEs, etc. +%package gtk4 +Summary: GTK4 terminal emulator library + +# libvte-2.91.so is generated from LGPLv2+ and MIT sources +License: LGPLv3+ and MIT + +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description gtk4 +VTE is a library implementing a terminal emulator widget for GTK 4. VTE +is mainly used in gnome-terminal, but can also be used to embed a +console/terminal in games, editors, IDEs, etc. + %package devel -Summary: Development files for %{name} +Summary: Development files for GTK+ 3 %{name} # vte-2.91 is generated from GPLv3+ sources, while the public headers are # LGPLv3+ @@ -75,7 +90,21 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for -developing applications that use %{name}. +developing GTK+ 3 applications that use %{name}. + +%package gtk4-devel +Summary: Development files for GTK 4 %{name} + +# vte-2.91 is generated from GPLv3+ sources, while the public headers are +# LGPLv3+ +License: GPLv3+ and LGPLv3+ + +Requires: %{name}-gtk4%{?_isa} = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description gtk4-devel +The %{name}-gtk4-devel package contains libraries and header files for +developing GTK 4 applications that use %{name}. # vte-profile is deliberately not noarch to avoid having to obsolete a noarch # subpackage in the future when we get rid of the vte3 / vte291 split. Yum is @@ -99,7 +128,7 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %endif %build -%meson --buildtype=plain -Ddocs=true +%meson --buildtype=plain -Ddocs=true -Dgtk3=true -Dgtk4=true %meson_build %install @@ -112,19 +141,38 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %license COPYING.XTERM %doc README.md %{_libdir}/libvte-%{apiver}.so.0* -%{_libdir}/girepository-1.0/ +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/Vte-2.91.typelib %{_userunitdir}/vte-spawn-.scope.d +%files gtk4 +%{_libdir}/libvte-%{apiver}-gtk4.so.0* +%{_libdir}/girepository-1.0/Vte-3.91.typelib + %files devel %license COPYING.GPL3 %{_bindir}/vte-%{apiver} %{_includedir}/vte-%{apiver}/ %{_libdir}/libvte-%{apiver}.so %{_libdir}/pkgconfig/vte-%{apiver}.pc -%{_datadir}/gir-1.0/ +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/Vte-2.91.gir %{_datadir}/glade/ %doc %{_docdir}/vte-2.91/ -%{_datadir}/vala/ +%dir %{_datadir}/vala +%dir %{_datadir}/vala/vapi +%{_datadir}/vala/vapi/vte-2.91.deps +%{_datadir}/vala/vapi/vte-2.91.vapi + +%files gtk4-devel +%{_bindir}/vte-%{apiver}-gtk4 +%{_includedir}/vte-%{apiver}-gtk4/ +%{_libdir}/libvte-%{apiver}-gtk4.so +%{_libdir}/pkgconfig/vte-%{apiver}-gtk4.pc +%{_datadir}/gir-1.0/Vte-3.91.gir +%doc %{_docdir}/vte-2.91-gtk4/ +%{_datadir}/vala/vapi/vte-2.91-gtk4.deps +%{_datadir}/vala/vapi/vte-2.91-gtk4.vapi %files -n vte-profile %license COPYING.GPL3 @@ -135,6 +183,7 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %changelog * Wed Aug 03 2022 David King - 0.69.90-1 - Update to 0.69.90 +- Enable GTK4 support * Mon Aug 01 2022 Frantisek Zatloukal - 0.68.0-3 - Rebuilt for ICU 71.1 From c3c0086976ab552e503b762860546c5a0ce94b7c Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 8 Aug 2022 14:08:58 +0200 Subject: [PATCH 029/102] Update to 0.69.92 --- .gitignore | 1 + sources | 2 +- vte291-0.69.90-fix-toml-docdir.patch | 35 ---------------------------- vte291.spec | 9 +++---- 4 files changed, 7 insertions(+), 40 deletions(-) delete mode 100644 vte291-0.69.90-fix-toml-docdir.patch diff --git a/.gitignore b/.gitignore index 74d0493..069773c 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,4 @@ /vte-0.67.90.tar.xz /vte-0.68.0.tar.bz2 /vte-0.69.90.tar.xz +/vte-0.69.92.tar.bz2 diff --git a/sources b/sources index 1916811..6291f15 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.69.90.tar.xz) = fc5506cc6c089c1dd7cd6917318b338e8f374340ac73046856f5dd0c2d99b6cc9654a8b578b1137766ed35a5352b7a4a2865639e63add7d845ab99c3b7d385e6 +SHA512 (vte-0.69.92.tar.bz2) = 363693a7698c8e1d9f61949b4568861e2b27f458d08d03ac7356154d5ee6721d3b3dfeb683d2e4c19fa6927a175041a351e2388aae753eeacfe4cd547e55ffb5 diff --git a/vte291-0.69.90-fix-toml-docdir.patch b/vte291-0.69.90-fix-toml-docdir.patch deleted file mode 100644 index 5b82ddc..0000000 --- a/vte291-0.69.90-fix-toml-docdir.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 901558bf471299e483976770e062730f35c13414 Mon Sep 17 00:00:00 2001 -From: Jeremy Bicha -Date: Fri, 29 Jul 2022 22:23:50 +0200 -Subject: [PATCH] docs: Install toml file to subdir - -Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2570 ---- - doc/reference/meson.build | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/doc/reference/meson.build b/doc/reference/meson.build -index 3d98c7ae..beffb322 100644 ---- a/doc/reference/meson.build -+++ b/doc/reference/meson.build -@@ -32,7 +32,7 @@ if get_option('gtk3') - configuration: doc_conf, - input: 'vte-gtk3.toml.in', - install: true, -- install_dir: docdir, -+ install_dir: docdir / vte_gtk3_api_name, - output: vte_gtk3_api_name + '.toml', - ) - -@@ -67,7 +67,7 @@ if get_option('gtk4') - configuration: doc_conf, - input: 'vte-gtk4.toml.in', - install: true, -- install_dir: docdir, -+ install_dir: docdir / vte_gtk4_api_name, - output: vte_gtk4_api_name + '.toml', - ) - --- -GitLab - diff --git a/vte291.spec b/vte291.spec index 041fa8d..680b472 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.69.90 +Version: 0.69.92 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -19,15 +19,13 @@ Summary: GTK+ 3 terminal emulator library License: LGPLv3+ and MIT URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.69/vte-%{version}.tar.xz +Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 # https://pagure.io/fedora-workstation/issue/216 Patch0: vte291-cntnr-precmd-preexec-scroll.patch -Patch1: vte291-0.69.90-fix-toml-docdir.patch - BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} @@ -181,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Aug 08 2022 Kalev Lember - 0.69.92-1 +- Update to 0.69.92 + * Wed Aug 03 2022 David King - 0.69.90-1 - Update to 0.69.90 - Enable GTK4 support From b1c725b42f6f3090db213e931f4a395f4af98797 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 19 Sep 2022 23:15:33 +0200 Subject: [PATCH 030/102] Update to 0.70.0 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 069773c..63efb75 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ /vte-0.68.0.tar.bz2 /vte-0.69.90.tar.xz /vte-0.69.92.tar.bz2 +/vte-0.70.0.tar.xz diff --git a/sources b/sources index 6291f15..229da36 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.69.92.tar.bz2) = 363693a7698c8e1d9f61949b4568861e2b27f458d08d03ac7356154d5ee6721d3b3dfeb683d2e4c19fa6927a175041a351e2388aae753eeacfe4cd547e55ffb5 +SHA512 (vte-0.70.0.tar.xz) = 9058a844b68a16e9b3f7a5808e46b7adea0743063bee33a4d6239d42d2e6b2c26820254e3ac1615d00865e5a6dd71737fa6bd4ce604977a18fdafa7178303e99 diff --git a/vte291.spec b/vte291.spec index 680b472..df8b019 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.69.92 +Version: 0.70.0 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -19,7 +19,7 @@ Summary: GTK+ 3 terminal emulator library License: LGPLv3+ and MIT URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 +Source0: https://download.gnome.org/sources/vte/0.70/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Sep 19 2022 Kalev Lember - 0.70.0-1 +- Update to 0.70.0 + * Mon Aug 08 2022 Kalev Lember - 0.69.92-1 - Update to 0.69.92 From e2e2f15eb641c1470c43a5823575521b9222ed7e Mon Sep 17 00:00:00 2001 From: David King Date: Tue, 27 Sep 2022 08:55:59 +0100 Subject: [PATCH 031/102] Fix GTK4 ABI padding (#2122922) --- vte291-cntnr-precmd-preexec-scroll.patch | 449 +++++++++++++---------- vte291.spec | 5 +- 2 files changed, 261 insertions(+), 193 deletions(-) diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index 7443b38..dbc727f 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,4 +1,4 @@ -From 22704d787b39e7f8d583a36d3a323854d43bebda Mon Sep 17 00:00:00 2001 +From 3354db2ca10487dd6ced2c54130b12e3a7bc53f8 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 01/11] Add sequences and signals for desktop notification @@ -18,13 +18,13 @@ https://phab.enlightenment.org/T1765 https://bugzilla.gnome.org/show_bug.cgi?id=711059 --- src/marshal.list | 1 + - src/vte.cc | 8 ++++++++ + src/vte.cc | 10 ++++++++++ src/vte/vteterminal.h | 4 +++- - src/vtegtk.cc | 21 +++++++++++++++++++++ - src/vtegtk.hh | 1 + - src/vteinternal.hh | 8 ++++++++ - src/vteseq.cc | 32 +++++++++++++++++++++++++++++++- - 7 files changed, 73 insertions(+), 2 deletions(-) + src/vtegtk.cc | 25 +++++++++++++++++++++++++ + src/vtegtk.hh | 3 +++ + src/vteinternal.hh | 14 ++++++++++++++ + src/vteseq.cc | 37 +++++++++++++++++++++++++++++++++++++ + 7 files changed, 93 insertions(+), 1 deletion(-) diff --git a/src/marshal.list b/src/marshal.list index 241128c3..4412cf3d 100644 @@ -36,13 +36,14 @@ index 241128c3..4412cf3d 100644 VOID:STRING,UINT VOID:UINT,UINT diff --git a/src/vte.cc b/src/vte.cc -index 00cd243b..2c4a66b5 100644 +index a8671845..77533d82 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10281,6 +10281,14 @@ Terminal::emit_pending_signals() +@@ -10164,6 +10164,16 @@ Terminal::emit_pending_signals() emit_adjustment_changed(); ++#if _VTE_GTK == 3 + if (m_pending_changes & vte::to_integral(PendingChanges::NOTIFICATION)) { + _vte_debug_print (VTE_DEBUG_SIGNALS, + "Emitting `notification-received'.\n"); @@ -50,21 +51,21 @@ index 00cd243b..2c4a66b5 100644 + m_notification_summary.c_str(), + m_notification_body.c_str()); + } ++#endif + if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 6f8a7751..0fdfce1e 100644 +index 78176f97..ac762498 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -108,10 +108,12 @@ struct _VteTerminalClass { - +@@ -109,9 +109,11 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); + #if _VTE_GTK == 3 + void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); + - #if _VTE_GTK == 3 /* Compatibility padding due to fedora patches intruding on our ABI */ /*< private >*/ - gpointer _extra_padding[3]; @@ -73,21 +74,24 @@ index 6f8a7751..0fdfce1e 100644 /* Add new vfuncs here, and subtract from the padding below. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 034c023b..778b69b2 100644 +index 3945ba67..570f8e69 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1274,6 +1274,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1251,6 +1251,9 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->child_exited = NULL; klass->encoding_changed = NULL; klass->char_size_changed = NULL; ++#if _VTE_GTK == 3 + klass->notification_received = NULL; ++#endif klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1357,6 +1358,26 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1334,6 +1337,28 @@ vte_terminal_class_init(VteTerminalClass *klass) G_OBJECT_CLASS_TYPE(klass), g_cclosure_marshal_VOID__INTv); ++#if _VTE_GTK == 3 + /** + * VteTerminal::notification-received: + * @vteterminal: the object which received the signal @@ -107,63 +111,73 @@ index 034c023b..778b69b2 100644 + _vte_marshal_VOID__STRING_STRING, + G_TYPE_NONE, + 2, G_TYPE_STRING, G_TYPE_STRING); ++#endif + /** * VteTerminal::window-title-changed: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 778b555a..67c456b5 100644 +index 6b7a1ea2..d5379b16 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -52,6 +52,7 @@ enum { +@@ -52,6 +52,9 @@ enum { SIGNAL_RESIZE_WINDOW, SIGNAL_RESTORE_WINDOW, SIGNAL_SELECTION_CHANGED, ++#if _VTE_GTK == 3 + SIGNAL_NOTIFICATION_RECEIVED, ++#endif SIGNAL_WINDOW_TITLE_CHANGED, LAST_SIGNAL }; diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 5037096d..1e8a27f6 100644 +index 0d454649..8dba726c 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -688,6 +688,10 @@ public: +@@ -662,6 +662,12 @@ public: gboolean m_cursor_moved_pending; gboolean m_contents_changed_pending; ++#if _VTE_GTK == 3 + /* desktop notification */ + std::string m_notification_summary; + std::string m_notification_body; ++#endif + std::string m_window_title{}; std::string m_current_directory_uri{}; std::string m_current_file_uri{}; -@@ -701,6 +705,7 @@ public: +@@ -675,6 +681,9 @@ public: TITLE = 1u << 0, CWD = 1u << 1, CWF = 1u << 2, ++#if _VTE_GTK == 3 + NOTIFICATION = 1u << 3, ++#endif }; unsigned m_pending_changes{0}; -@@ -1539,6 +1544,9 @@ public: +@@ -1506,6 +1515,11 @@ public: int osc) noexcept; /* OSC handlers */ ++#if _VTE_GTK == 3 + void handle_urxvt_extension(vte::parser::Sequence const& seq, + vte::parser::StringTokeniser::const_iterator& token, + vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept; ++#endif void set_color(vte::parser::Sequence const& seq, vte::parser::StringTokeniser::const_iterator& token, vte::parser::StringTokeniser::const_iterator const& endtoken, diff --git a/src/vteseq.cc b/src/vteseq.cc -index 9efde087..772ba4f3 100644 +index 874d2405..dda487c4 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1408,6 +1408,33 @@ Terminal::delete_lines(vte::grid::row_t param) +@@ -1376,6 +1376,35 @@ Terminal::delete_lines(vte::grid::row_t param) m_text_deleted_flag = TRUE; } ++#if _VTE_GTK == 3 +void +Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, + vte::parser::StringTokeniser::const_iterator& token, @@ -190,34 +204,39 @@ index 9efde087..772ba4f3 100644 + return; + } +} ++#endif + bool Terminal::get_osc_color_index(int osc, int value, -@@ -6687,6 +6714,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6541,6 +6570,12 @@ Terminal::OSC(vte::parser::Sequence const& seq) reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE); break; ++#if _VTE_GTK == 3 + case VTE_OSC_URXVT_EXTENSION: + handle_urxvt_extension(seq, it, cend); + break; ++#endif + case VTE_OSC_XTERM_SET_ICON_TITLE: case VTE_OSC_XTERM_SET_XPROPERTY: case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG: -@@ -6728,7 +6759,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6582,7 +6617,9 @@ Terminal::OSC(vte::parser::Sequence const& seq) case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC: case VTE_OSC_URXVT_VIEW_UP: case VTE_OSC_URXVT_VIEW_DOWN: -- case VTE_OSC_URXVT_EXTENSION: ++#if _VTE_GTK != 3 + case VTE_OSC_URXVT_EXTENSION: ++#endif case VTE_OSC_YF_RQGWR: default: break; -- -2.37.1 +2.37.3 -From b885c59413ac8f64891ced008767efc180d8d90a Mon Sep 17 00:00:00 2001 +From ca0549eafe1fd03d11a632d07c0fab7fd4b333ac Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND @@ -250,10 +269,10 @@ index 242d6c42..50242223 100644 } -- -2.37.1 +2.37.3 -From ce224baf4eac101842a05e848874608bda2dd715 Mon Sep 17 00:00:00 2001 +From b281275ed320f9a2f82d6e436a397ad005dafce0 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 Subject: [PATCH 03/11] Test the notification-received signal @@ -263,10 +282,10 @@ Subject: [PATCH 03/11] Test the notification-received signal 1 file changed, 10 insertions(+) diff --git a/src/app/app.cc b/src/app/app.cc -index 9d53f274..3c666816 100644 +index a69d9327..88fe5f2f 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2245,6 +2245,14 @@ window_window_title_changed_cb(VteTerminal* terminal, +@@ -2286,6 +2286,14 @@ window_window_title_changed_cb(VteTerminal* terminal, gtk_window_set_title(GTK_WINDOW(window), title && title[0] ? title : "Terminal"); } @@ -281,7 +300,7 @@ index 9d53f274..3c666816 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2541,6 +2549,8 @@ vteapp_window_constructed(GObject *object) +@@ -2582,6 +2590,8 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); @@ -291,10 +310,10 @@ index 9d53f274..3c666816 100644 #if VTE_GTK == 3 if (options.no_double_buffer) { -- -2.37.1 +2.37.3 -From 574e63dbad4c0ae09cf9ff4fff2fdc00de49e9a3 Mon Sep 17 00:00:00 2001 +From 2832ac1e0bf8eb3e0147b0803637765a4b5ac832 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 Subject: [PATCH 04/11] Add a property to configure the scroll speed @@ -304,30 +323,32 @@ moving the buffer by a function of the number of visible rows. https://bugzilla.redhat.com/show_bug.cgi?id=1103380 --- - src/vte.cc | 19 +++++++++++++++- - src/vte/vteterminal.h | 4 ++++ - src/vtegtk.cc | 51 +++++++++++++++++++++++++++++++++++++++++++ - src/vtegtk.hh | 1 + - src/vteinternal.hh | 2 ++ - 5 files changed, 76 insertions(+), 1 deletion(-) + src/vte.cc | 25 ++++++++++++++++++ + src/vte/vteterminal.h | 6 +++++ + src/vtegtk.cc | 59 +++++++++++++++++++++++++++++++++++++++++++ + src/vtegtk.hh | 3 +++ + src/vteinternal.hh | 6 +++++ + 5 files changed, 99 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index 2c4a66b5..93fc18d2 100644 +index 77533d82..e2723342 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -9455,6 +9455,7 @@ vte_cairo_get_clip_region(cairo_t *cr) +@@ -9364,6 +9364,9 @@ vte_cairo_get_clip_region(cairo_t *cr) bool Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) { ++#if _VTE_GTK == 3 + gdouble scroll_speed; ++#endif gdouble v; gint cnt, i; int button; -@@ -9489,7 +9490,13 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) +@@ -9398,7 +9401,17 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) return true; } -- v = MAX (1., ceil (m_row_count /* page increment */ / 10.)); ++#if _VTE_GTK == 3 + if (m_scroll_speed == 0) { + scroll_speed = ceil (m_row_count /* page increment */ / 10.); + } else { @@ -335,13 +356,17 @@ index 2c4a66b5..93fc18d2 100644 + } + + v = MAX (1., scroll_speed); ++#else + v = MAX (1., ceil (m_row_count /* page increment */ / 10.)); ++#endif _vte_debug_print(VTE_DEBUG_EVENTS, "Scroll speed is %d lines per non-smooth scroll unit\n", (int) v); -@@ -9799,6 +9806,16 @@ Terminal::decscusr_cursor_shape() const noexcept +@@ -9708,6 +9721,18 @@ Terminal::decscusr_cursor_shape() const noexcept } } ++#if _VTE_GTK == 3 +bool +Terminal::set_scroll_speed(unsigned int scroll_speed) +{ @@ -351,53 +376,61 @@ index 2c4a66b5..93fc18d2 100644 + m_scroll_speed = scroll_speed; + return true; +} ++#endif + bool Terminal::set_scrollback_lines(long lines) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 0fdfce1e..c1240e8a 100644 +index ac762498..972c4a0c 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -330,6 +330,10 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, +@@ -330,6 +330,12 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, _VTE_PUBLIC VteCursorShape vte_terminal_get_cursor_shape(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); ++#if _VTE_GTK == 3 +_VTE_PUBLIC +void vte_terminal_set_scroll_speed(VteTerminal *terminal, + guint scroll_speed) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); ++#endif + /* Set the number of scrollback lines, above or at an internal minimum. */ _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 778b69b2..3992766f 100644 +index 570f8e69..a9f58696 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -993,6 +993,9 @@ try +@@ -1002,6 +1002,11 @@ try case PROP_REWRAP_ON_RESIZE: g_value_set_boolean (value, vte_terminal_get_rewrap_on_resize (terminal)); break; ++#if _VTE_GTK == 3 + case PROP_SCROLL_SPEED: + g_value_set_uint (value, impl->m_scroll_speed); + break; ++#endif case PROP_SCROLLBACK_LINES: g_value_set_uint (value, vte_terminal_get_scrollback_lines(terminal)); break; -@@ -1130,6 +1133,9 @@ try +@@ -1123,6 +1128,11 @@ try case PROP_REWRAP_ON_RESIZE: vte_terminal_set_rewrap_on_resize (terminal, g_value_get_boolean (value)); break; ++#if _VTE_GTK == 3 + case PROP_SCROLL_SPEED: + vte_terminal_set_scroll_speed (terminal, g_value_get_uint (value)); + break; ++#endif case PROP_SCROLLBACK_LINES: vte_terminal_set_scrollback_lines (terminal, g_value_get_uint (value)); break; -@@ -2246,6 +2252,21 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2223,6 +2233,23 @@ vte_terminal_class_init(VteTerminalClass *klass) TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); ++#if _VTE_GTK == 3 + /** + * VteTerminal:scroll-speed: + * @@ -412,14 +445,16 @@ index 778b69b2..3992766f 100644 + 0, G_MAXUINT, + 0, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); ++#endif + /** * VteTerminal:scrollback-lines: * -@@ -5851,6 +5872,36 @@ catch (...) +@@ -5958,6 +5985,38 @@ catch (...) return -1; } ++#if _VTE_GTK == 3 +/** + * vte_terminal_set_scroll_speed: + * @terminal: a #VteTerminal @@ -449,90 +484,103 @@ index 778b69b2..3992766f 100644 +{ + vte::log_exception(); +} ++#endif + /** * vte_terminal_set_scrollback_lines: * @terminal: a #VteTerminal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 67c456b5..64ff8be8 100644 +index d5379b16..3f1ae86d 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -86,6 +86,7 @@ enum { +@@ -88,6 +88,9 @@ enum { PROP_MOUSE_POINTER_AUTOHIDE, PROP_PTY, PROP_REWRAP_ON_RESIZE, ++#if _VTE_GTK == 3 + PROP_SCROLL_SPEED, ++#endif PROP_SCROLLBACK_LINES, PROP_SCROLL_ON_KEYSTROKE, PROP_SCROLL_ON_OUTPUT, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 1e8a27f6..0e5a8ace 100644 +index 8dba726c..4629c95f 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -439,6 +439,7 @@ public: +@@ -428,6 +428,9 @@ public: bool m_fallback_scrolling{true}; bool m_scroll_on_output{false}; bool m_scroll_on_keystroke{true}; ++#if _VTE_GTK == 3 + guint m_scroll_speed; ++#endif vte::grid::row_t m_scrollback_lines{0}; inline auto scroll_limit_lower() const noexcept -@@ -1412,6 +1413,7 @@ public: +@@ -1385,6 +1388,9 @@ public: bool set_input_enabled(bool enabled); bool set_mouse_autohide(bool autohide); bool set_rewrap_on_resize(bool rewrap); ++#if _VTE_GTK == 3 + bool set_scroll_speed(unsigned int scroll_speed); ++#endif bool set_scrollback_lines(long lines); bool set_fallback_scrolling(bool set); auto fallback_scrolling() const noexcept { return m_fallback_scrolling; } -- -2.37.1 +2.37.3 -From 57e1446aa0085ecb194ef91b6a54a67f6005230c Mon Sep 17 00:00:00 2001 +From 10f3d37fdc465152b805e54d3217a61d69e4c255 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 Subject: [PATCH 05/11] Test the scroll-speed property https://bugzilla.redhat.com/show_bug.cgi?id=1103380 --- - src/app/app.cc | 4 ++++ - 1 file changed, 4 insertions(+) + src/app/app.cc | 10 ++++++++++ + 1 file changed, 10 insertions(+) diff --git a/src/app/app.cc b/src/app/app.cc -index 3c666816..2c2e8bde 100644 +index 88fe5f2f..49a1689d 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -119,6 +119,7 @@ public: +@@ -118,6 +118,9 @@ public: int verbosity{0}; double cell_height_scale{1.0}; double cell_width_scale{1.0}; ++#if _VTE_GTK == 3 + unsigned int scroll_speed{0}; ++#endif VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM}; VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK}; VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS}; -@@ -647,6 +648,8 @@ public: +@@ -700,6 +703,10 @@ public: "Reverse foreground/background colors", nullptr }, { "require-systemd-scope", 0, 0, G_OPTION_ARG_NONE, &require_systemd_scope, "Require use of a systemd user scope", nullptr }, ++#if _VTE_GTK == 3 + { "scroll-speed", 0, 0, G_OPTION_ARG_INT, &scroll_speed, + "Specify the scroll speed", nullptr }, ++#endif { "scroll-unit-is-pixels", 0, 0, G_OPTION_ARG_NONE, &scroll_unit_is_pixels, "Use pixels as scroll unit", nullptr }, { "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines, -@@ -2586,6 +2589,7 @@ vteapp_window_constructed(GObject *object) +@@ -2626,6 +2633,9 @@ vteapp_window_constructed(GObject *object) vte_terminal_set_rewrap_on_resize(window->terminal, !options.no_rewrap); vte_terminal_set_scroll_on_output(window->terminal, false); vte_terminal_set_scroll_on_keystroke(window->terminal, true); ++#if _VTE_GTK == 3 + vte_terminal_set_scroll_speed(window->terminal, options.scroll_speed); ++#endif vte_terminal_set_scroll_unit_is_pixels(window->terminal, options.scroll_unit_is_pixels); vte_terminal_set_scrollback_lines(window->terminal, options.scrollback_lines); vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); -- -2.37.1 +2.37.3 -From 6909335767cfbdee9a8e05949eef21f9cedffe20 Mon Sep 17 00:00:00 2001 +From d2f139cc2f440a390bec6438a4292b50213f5818 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 06/11] Support preexec notifications from an interactive shell @@ -561,22 +609,22 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 93fc18d2..77c50558 100644 +index e2723342..766b7624 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10306,6 +10306,12 @@ Terminal::emit_pending_signals() +@@ -10197,6 +10197,12 @@ Terminal::emit_pending_signals() + m_notification_summary.c_str(), m_notification_body.c_str()); } - ++ + if (m_pending_changes & vte::to_integral(PendingChanges::SHELL_PREEXEC)) { + _vte_debug_print (VTE_DEBUG_SIGNALS, + "Emitting `shell-preexec'.\n"); + g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); + } -+ + #endif + if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { - if (m_window_title != m_window_title_pending) { - m_window_title.swap(m_window_title_pending); diff --git a/src/vte.sh.in b/src/vte.sh.in index 50242223..01b44e23 100644 --- a/src/vte.sh.in @@ -594,16 +642,15 @@ index 50242223..01b44e23 100644 elif [[ -n "${ZSH_VERSION:-}" ]]; then diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index c1240e8a..eba96927 100644 +index 972c4a0c..8bdd3ccf 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -109,11 +109,12 @@ struct _VteTerminalClass { - void (*bell)(VteTerminal* terminal); +@@ -110,10 +110,11 @@ struct _VteTerminalClass { + #if _VTE_GTK == 3 void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); + void (*shell_preexec)(VteTerminal* terminal); - #if _VTE_GTK == 3 /* Compatibility padding due to fedora patches intruding on our ABI */ /*< private >*/ - gpointer _extra_padding[2]; @@ -612,21 +659,22 @@ index c1240e8a..eba96927 100644 /* Add new vfuncs here, and subtract from the padding below. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 3992766f..4ef646d7 100644 +index a9f58696..797865db 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1281,6 +1281,7 @@ vte_terminal_class_init(VteTerminalClass *klass) - klass->encoding_changed = NULL; +@@ -1263,6 +1263,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->char_size_changed = NULL; + #if _VTE_GTK == 3 klass->notification_received = NULL; + klass->shell_preexec = NULL; + #endif klass->window_title_changed = NULL; klass->icon_title_changed = NULL; - klass->selection_changed = NULL; -@@ -1384,6 +1385,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1367,6 +1368,23 @@ vte_terminal_class_init(VteTerminalClass *klass) + _vte_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); - ++ + /** + * VteTerminal::shell-preexec: + * @vteterminal: the object which received the signal @@ -643,39 +691,38 @@ index 3992766f..4ef646d7 100644 + NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); -+ + #endif + /** - * VteTerminal::window-title-changed: - * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 64ff8be8..179222a1 100644 +index 3f1ae86d..0c86fb6e 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -52,6 +52,7 @@ enum { - SIGNAL_RESIZE_WINDOW, +@@ -53,6 +53,7 @@ enum { SIGNAL_RESTORE_WINDOW, SIGNAL_SELECTION_CHANGED, + #if _VTE_GTK == 3 + SIGNAL_SHELL_PREEXEC, SIGNAL_NOTIFICATION_RECEIVED, + #endif SIGNAL_WINDOW_TITLE_CHANGED, - LAST_SIGNAL diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 0e5a8ace..11965778 100644 +index 4629c95f..dfa3c0b9 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -707,6 +707,7 @@ public: - CWD = 1u << 1, +@@ -686,6 +686,7 @@ public: CWF = 1u << 2, + #if _VTE_GTK == 3 NOTIFICATION = 1u << 3, + SHELL_PREEXEC = 1u << 4, + #endif }; unsigned m_pending_changes{0}; - diff --git a/src/vteseq.cc b/src/vteseq.cc -index 772ba4f3..76b9329e 100644 +index dda487c4..f2c86b2c 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1433,6 +1433,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1402,6 +1402,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, m_notification_body = *token; return; } @@ -684,13 +731,13 @@ index 772ba4f3..76b9329e 100644 + m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PREEXEC); + } } + #endif - bool -- -2.37.1 +2.37.3 -From 39c75a48973425aad1bf25f0181d49600c7d8119 Mon Sep 17 00:00:00 2001 +From 05425620f9e65704eec774cd567e15f5e385f89d Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 Subject: [PATCH 07/11] Test the shell-preexec signal @@ -702,10 +749,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 1 file changed, 7 insertions(+) diff --git a/src/app/app.cc b/src/app/app.cc -index 2c2e8bde..a66b56f0 100644 +index 49a1689d..90b2dfe5 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2256,6 +2256,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2301,6 +2301,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -718,7 +765,7 @@ index 2c2e8bde..a66b56f0 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2553,6 +2559,7 @@ vteapp_window_constructed(GObject *object) +@@ -2598,6 +2604,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -727,10 +774,10 @@ index 2c2e8bde..a66b56f0 100644 /* Settings */ #if VTE_GTK == 3 -- -2.37.1 +2.37.3 -From bfb447be5a97cda7523719ab901c1ea6b0293a6b Mon Sep 17 00:00:00 2001 +From 57dd88ebfe1b3df1bafe7fd904dd0df7c1094f59 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 08/11] Support precmd notifications from an interactive shell @@ -751,30 +798,30 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 --- src/vte.cc | 6 ++++++ src/vte.sh.in | 2 +- - src/vte/vteterminal.h | 7 +------ + src/vte/vteterminal.h | 5 +---- src/vtegtk.cc | 18 ++++++++++++++++++ src/vtegtk.hh | 1 + src/vteinternal.hh | 1 + src/vteseq.cc | 4 +++- - 7 files changed, 31 insertions(+), 8 deletions(-) + 7 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 77c50558..604890e3 100644 +index 766b7624..6cef7b17 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10312,6 +10312,12 @@ Terminal::emit_pending_signals() +@@ -10203,6 +10203,12 @@ Terminal::emit_pending_signals() + "Emitting `shell-preexec'.\n"); g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); } - ++ + if (m_pending_changes & vte::to_integral(PendingChanges::SHELL_PRECMD)) { + _vte_debug_print (VTE_DEBUG_SIGNALS, + "Emitting `shell-precmd'.\n"); + g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PRECMD], 0); + } -+ + #endif + if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { - if (m_window_title != m_window_title_pending) { - m_window_title.swap(m_window_title_pending); diff --git a/src/vte.sh.in b/src/vte.sh.in index 01b44e23..877fe93d 100644 --- a/src/vte.sh.in @@ -789,38 +836,35 @@ index 01b44e23..877fe93d 100644 } diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index eba96927..c49f217e 100644 +index 8bdd3ccf..31bb3b75 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -109,14 +109,9 @@ struct _VteTerminalClass { - void (*bell)(VteTerminal* terminal); +@@ -110,11 +110,8 @@ struct _VteTerminalClass { + #if _VTE_GTK == 3 void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); + void (*shell_precmd)(VteTerminal* terminal); void (*shell_preexec)(VteTerminal* terminal); - --#if _VTE_GTK == 3 +- - /* Compatibility padding due to fedora patches intruding on our ABI */ - /*< private >*/ - gpointer _extra_padding[1]; --#endif /* _VTE_GTK == 3 */ -- - /* Add new vfuncs here, and subtract from the padding below. */ + #endif /* _VTE_GTK == 3 */ - /* Padding for future expansion. */ + /* Add new vfuncs here, and subtract from the padding below. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 4ef646d7..54ed6fc1 100644 +index 797865db..bd3a8798 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1281,6 +1281,7 @@ vte_terminal_class_init(VteTerminalClass *klass) - klass->encoding_changed = NULL; +@@ -1263,6 +1263,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->char_size_changed = NULL; + #if _VTE_GTK == 3 klass->notification_received = NULL; + klass->shell_precmd = NULL; klass->shell_preexec = NULL; + #endif klass->window_title_changed = NULL; - klass->icon_title_changed = NULL; -@@ -1385,6 +1386,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1369,6 +1370,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -845,34 +889,34 @@ index 4ef646d7..54ed6fc1 100644 * VteTerminal::shell-preexec: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 179222a1..c66aeda2 100644 +index 0c86fb6e..e871b946 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -52,6 +52,7 @@ enum { - SIGNAL_RESIZE_WINDOW, +@@ -53,6 +53,7 @@ enum { SIGNAL_RESTORE_WINDOW, SIGNAL_SELECTION_CHANGED, + #if _VTE_GTK == 3 + SIGNAL_SHELL_PRECMD, SIGNAL_SHELL_PREEXEC, SIGNAL_NOTIFICATION_RECEIVED, - SIGNAL_WINDOW_TITLE_CHANGED, + #endif diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 11965778..d4a10935 100644 +index dfa3c0b9..b8e30d15 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -708,6 +708,7 @@ public: - CWF = 1u << 2, +@@ -687,6 +687,7 @@ public: + #if _VTE_GTK == 3 NOTIFICATION = 1u << 3, SHELL_PREEXEC = 1u << 4, + SHELL_PRECMD = 1u << 5, + #endif }; unsigned m_pending_changes{0}; - diff --git a/src/vteseq.cc b/src/vteseq.cc -index 76b9329e..fb958962 100644 +index f2c86b2c..bae18595 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1434,7 +1434,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1403,7 +1403,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, return; } @@ -884,10 +928,10 @@ index 76b9329e..fb958962 100644 } } -- -2.37.1 +2.37.3 -From d84dd319c31ffdcfd73b08750228efba34e226fb Mon Sep 17 00:00:00 2001 +From 089580a09de21160f871875fe960e895bc5b5bc2 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 09/11] Test the shell-precmd signal @@ -899,10 +943,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 1 file changed, 7 insertions(+) diff --git a/src/app/app.cc b/src/app/app.cc -index a66b56f0..9d02499b 100644 +index 90b2dfe5..5c4946c9 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2256,6 +2256,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2301,6 +2301,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -915,7 +959,7 @@ index a66b56f0..9d02499b 100644 static void shell_preexec_cb(VteTerminal *terminal) { -@@ -2559,6 +2565,7 @@ vteapp_window_constructed(GObject *object) +@@ -2604,6 +2610,7 @@ vteapp_window_constructed(GObject *object) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); @@ -924,10 +968,10 @@ index a66b56f0..9d02499b 100644 /* Settings */ -- -2.37.1 +2.37.3 -From 691fece42c52662dcf53b4bf5360ca0d48822580 Mon Sep 17 00:00:00 2001 +From 2e940b5a720dea9a06fd47862381f27f765f76dd Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 10/11] Support tracking the active container inside the @@ -961,21 +1005,22 @@ agreed upon across multiple different terminal emulators [1]. [1] https://gitlab.freedesktop.org/terminal-wg/specifications/issues/17 --- src/vte.cc | 8 ++++ - src/vte/vteterminal.h | 4 ++ - src/vtegtk.cc | 77 ++++++++++++++++++++++++++++++++++++++ - src/vtegtk.hh | 2 + - src/vteinternal.hh | 16 ++++++++ - src/vteseq.cc | 86 +++++++++++++++++++++++++++++++++++++++++++ - 6 files changed, 193 insertions(+) + src/vte/vteterminal.h | 6 +++ + src/vtegtk.cc | 83 +++++++++++++++++++++++++++++++++++++++ + src/vtegtk.hh | 4 ++ + src/vteinternal.hh | 20 ++++++++++ + src/vteseq.cc | 90 +++++++++++++++++++++++++++++++++++++++++++ + 6 files changed, 211 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index 604890e3..fca21ddf 100644 +index 6cef7b17..21823424 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10331,6 +10331,14 @@ Terminal::emit_pending_signals() - m_window_title_pending.clear(); - } - +@@ -10209,6 +10209,14 @@ Terminal::emit_pending_signals() + "Emitting `shell-precmd'.\n"); + g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PRECMD], 0); + } ++ + if (m_pending_changes & vte::to_integral(PendingChanges::CONTAINERS)) { + _vte_debug_print(VTE_DEBUG_SIGNALS, + "Notifying `current-container-name' and `current-container-runtime'.\n"); @@ -983,46 +1028,50 @@ index 604890e3..fca21ddf 100644 + g_object_notify_by_pspec(freezer.get(), pspecs[PROP_CURRENT_CONTAINER_NAME]); + g_object_notify_by_pspec(freezer.get(), pspecs[PROP_CURRENT_CONTAINER_RUNTIME]); + } -+ - if (m_pending_changes & vte::to_integral(PendingChanges::CWD)) { - if (m_current_directory_uri != m_current_directory_uri_pending) { - m_current_directory_uri.swap(m_current_directory_uri_pending); + #endif + + if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index c49f217e..c490f157 100644 +index 31bb3b75..12ecf181 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -514,6 +514,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT +@@ -551,6 +551,12 @@ _VTE_PUBLIC + glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); _VTE_PUBLIC const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); - _VTE_PUBLIC ++#if _VTE_GTK == 3 ++_VTE_PUBLIC +const char *vte_terminal_get_current_container_name(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); +_VTE_PUBLIC +const char *vte_terminal_get_current_container_runtime(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+_VTE_PUBLIC ++#endif + _VTE_PUBLIC const char *vte_terminal_get_current_directory_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); _VTE_PUBLIC - const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 54ed6fc1..b2ec8f40 100644 +index bd3a8798..0457b2b9 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -942,6 +942,12 @@ try +@@ -951,6 +951,14 @@ try case PROP_CURSOR_BLINK_MODE: g_value_set_enum (value, vte_terminal_get_cursor_blink_mode (terminal)); break; ++#if _VTE_GTK == 3 + case PROP_CURRENT_CONTAINER_NAME: + g_value_set_string (value, vte_terminal_get_current_container_name (terminal)); + break; + case PROP_CURRENT_CONTAINER_RUNTIME: + g_value_set_string (value, vte_terminal_get_current_container_runtime (terminal)); + break; ++#endif case PROP_CURRENT_DIRECTORY_URI: g_value_set_string (value, vte_terminal_get_current_directory_uri (terminal)); break; -@@ -2393,6 +2399,27 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2376,6 +2384,29 @@ vte_terminal_class_init(VteTerminalClass *klass) NULL, (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); ++#if _VTE_GTK == 3 + /** + * VteTerminal:current-container-name: + * @@ -1043,14 +1092,16 @@ index 54ed6fc1..b2ec8f40 100644 + g_param_spec_string ("current-container-runtime", NULL, NULL, + NULL, + (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); ++#endif + /** * VteTerminal:current-directory-uri: * -@@ -5022,6 +5049,56 @@ catch (...) +@@ -5129,6 +5160,58 @@ catch (...) return -1; } ++#if _VTE_GTK == 3 +/** + * vte_terminal_get_current_container_name: + * @terminal: a #VteTerminal @@ -1100,39 +1151,45 @@ index 54ed6fc1..b2ec8f40 100644 + vte::log_exception(); + return NULL; +} ++#endif + /** * vte_terminal_get_current_directory_uri: * @terminal: a #VteTerminal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index c66aeda2..cf572de4 100644 +index e871b946..0a31d205 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -72,6 +72,8 @@ enum { +@@ -74,6 +74,10 @@ enum { PROP_CJK_AMBIGUOUS_WIDTH, PROP_CURSOR_BLINK_MODE, PROP_CURSOR_SHAPE, ++#if _VTE_GTK == 3 + PROP_CURRENT_CONTAINER_NAME, + PROP_CURRENT_CONTAINER_RUNTIME, ++#endif PROP_CURRENT_DIRECTORY_URI, PROP_CURRENT_FILE_URI, PROP_DELETE_BINDING, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index d4a10935..0f219dc6 100644 +index b8e30d15..0c52442b 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -59,6 +59,7 @@ +@@ -59,6 +59,9 @@ #include #include #include ++#if _VTE_GTK == 3 +#include ++#endif #include #include #include -@@ -114,6 +115,18 @@ typedef enum _VteCharacterReplacement { +@@ -110,6 +113,20 @@ typedef enum _VteCharacterReplacement { VTE_CHARACTER_REPLACEMENT_LINE_DRAWING } VteCharacterReplacement; ++#if _VTE_GTK == 3 +struct VteContainer { +public: + VteContainer(const std::string &name, const std::string &runtime) : @@ -1144,50 +1201,57 @@ index d4a10935..0f219dc6 100644 + std::string m_name; + std::string m_runtime; +}; ++#endif + typedef struct _VtePaletteColor { struct { vte::color::rgb color; -@@ -689,6 +702,8 @@ public: - gboolean m_cursor_moved_pending; +@@ -666,6 +683,8 @@ public: gboolean m_contents_changed_pending; + #if _VTE_GTK == 3 + std::stack m_containers; + /* desktop notification */ std::string m_notification_summary; std::string m_notification_body; -@@ -709,6 +724,7 @@ public: +@@ -688,6 +707,7 @@ public: NOTIFICATION = 1u << 3, SHELL_PREEXEC = 1u << 4, SHELL_PRECMD = 1u << 5, + CONTAINERS = 1u << 6, + #endif }; unsigned m_pending_changes{0}; - diff --git a/src/vteseq.cc b/src/vteseq.cc -index fb958962..5b36dd9b 100644 +index bae18595..8a7f5b34 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -19,10 +19,14 @@ +@@ -19,6 +19,7 @@ #include "config.h" -+#include + #include #include #include - #include +@@ -39,6 +40,11 @@ + #define ST_C0 _VTE_CAP_ST + + #include ++#if _VTE_GTK == 3 ++#include +#include +#include - #ifdef HAVE_SYS_SYSLIMITS_H - #include - #endif -@@ -1416,6 +1420,88 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, ++#endif + + using namespace std::literals; + +@@ -1385,6 +1391,90 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, if (token == endtoken) return; ++#if _VTE_GTK == 3 + if (*token == "container") { + ++token; + @@ -1269,15 +1333,16 @@ index fb958962..5b36dd9b 100644 + + return; + } ++#endif + if (*token == "notify") { ++token; -- -2.37.1 +2.37.3 -From 09b7ad967e395ef95f3428982596a2d80a0097e1 Mon Sep 17 00:00:00 2001 +From f15bfe821e0deefcf62d649c27e73b802f5338f0 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region @@ -1293,10 +1358,10 @@ This reverts commit 73713ec0644e232fb740170e399282be778d97f9. 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index fca21ddf..eeb29eab 100644 +index 21823424..20767b61 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -6566,10 +6566,7 @@ Terminal::maybe_end_selection() +@@ -6525,10 +6525,7 @@ Terminal::maybe_end_selection() /* * Terminal::select_all: * @@ -1308,7 +1373,7 @@ index fca21ddf..eeb29eab 100644 */ void Terminal::select_all() -@@ -6578,8 +6575,8 @@ Terminal::select_all() +@@ -6537,8 +6534,8 @@ Terminal::select_all() m_selecting_had_delta = TRUE; @@ -1320,5 +1385,5 @@ index fca21ddf..eeb29eab 100644 _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); -- -2.37.1 +2.37.3 diff --git a/vte291.spec b/vte291.spec index df8b019..5b48967 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.70.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Sep 26 2022 David King - 0.70.0-2 +- Fix GTK4 ABI padding (#2122922) + * Mon Sep 19 2022 Kalev Lember - 0.70.0-1 - Update to 0.70.0 From 8ab9519d87d269e3c2b4b2803bd90377158672c3 Mon Sep 17 00:00:00 2001 From: David King Date: Fri, 28 Oct 2022 08:38:30 +0100 Subject: [PATCH 032/102] Update to 0.70.1 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 63efb75..2f9eedf 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,4 @@ /vte-0.69.90.tar.xz /vte-0.69.92.tar.bz2 /vte-0.70.0.tar.xz +/vte-0.70.1.tar.xz diff --git a/sources b/sources index 229da36..c07e47c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.70.0.tar.xz) = 9058a844b68a16e9b3f7a5808e46b7adea0743063bee33a4d6239d42d2e6b2c26820254e3ac1615d00865e5a6dd71737fa6bd4ce604977a18fdafa7178303e99 +SHA512 (vte-0.70.1.tar.xz) = dd4ff3fd941d8adb761eea8b12b5b44c0ddab67681c8b28fb106096530906903cbf29c4a6f8a895e04232da3661c42b008c0c8f060410a54d22fd240741d6742 diff --git a/vte291.spec b/vte291.spec index 5b48967..430b0c6 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,8 +11,8 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.70.0 -Release: 2%{?dist} +Version: 0.70.1 +Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Fri Oct 28 2022 David King - 0.70.1-1 +- Update to 0.70.1 + * Mon Sep 26 2022 David King - 0.70.0-2 - Fix GTK4 ABI padding (#2122922) From fb6fa5db7d8234006639834701818736f1ae13c1 Mon Sep 17 00:00:00 2001 From: David King Date: Tue, 6 Dec 2022 13:49:25 +0000 Subject: [PATCH 033/102] Update to 0.70.2 --- .gitignore | 1 + sources | 2 +- vte291.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2f9eedf..7773a58 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,4 @@ /vte-0.69.92.tar.bz2 /vte-0.70.0.tar.xz /vte-0.70.1.tar.xz +/vte-0.70.2.tar.xz diff --git a/sources b/sources index c07e47c..91ac12c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.70.1.tar.xz) = dd4ff3fd941d8adb761eea8b12b5b44c0ddab67681c8b28fb106096530906903cbf29c4a6f8a895e04232da3661c42b008c0c8f060410a54d22fd240741d6742 +SHA512 (vte-0.70.2.tar.xz) = ca54686a3e6cd8166be7f2d7fe93aaecde0845764911b56a6ea48918041b39d13da1ad9e2660cfac27564bda3236be001ca7dc87ab4576339c50fc2d3b0238b5 diff --git a/vte291.spec b/vte291.spec index 430b0c6..5f33068 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.70.1 +Version: 0.70.2 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Tue Dec 06 2022 David King - 0.70.2-1 +- Update to 0.70.2 + * Fri Oct 28 2022 David King - 0.70.1-1 - Update to 0.70.1 From 3e4ce78c9c6f245d62dff2fce68ad9dad9946ba8 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Sat, 31 Dec 2022 03:28:47 +0000 Subject: [PATCH 034/102] Rebuild for ICU 72 --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 5f33068..925e514 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.70.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sat Dec 31 2022 Pete Walter - 0.70.2-2 +- Rebuild for ICU 72 + * Tue Dec 06 2022 David King - 0.70.2-1 - Update to 0.70.2 From 90aa5085bce54331550473aaae023ecf7de08792 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 06:31:52 +0000 Subject: [PATCH 035/102] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 925e514..56ce935 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.70.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 0.70.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Dec 31 2022 Pete Walter - 0.70.2-2 - Rebuild for ICU 72 From 4647c6feb3bee06e80f842b7b4a90de2eff87805 Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 15 Feb 2023 18:37:37 +0000 Subject: [PATCH 036/102] Update to 0.71.92 --- .gitignore | 1 + sources | 2 +- vte291.spec | 11 +++++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 7773a58..c2b9ed1 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,4 @@ /vte-0.70.0.tar.xz /vte-0.70.1.tar.xz /vte-0.70.2.tar.xz +/vte-0.71.92.tar.xz diff --git a/sources b/sources index 91ac12c..3ca1d8d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.70.2.tar.xz) = ca54686a3e6cd8166be7f2d7fe93aaecde0845764911b56a6ea48918041b39d13da1ad9e2660cfac27564bda3236be001ca7dc87ab4576339c50fc2d3b0238b5 +SHA512 (vte-0.71.92.tar.xz) = 7711607b4a0a28bdcf0d73be46dff206c40baa4b5e0b32c32b517114e9fbe2050a76150d5da48429644dc7765172101a910cdd74166c7c28cea07e0af6ca56a3 diff --git a/vte291.spec b/vte291.spec index 56ce935..f6ab735 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,15 +11,15 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.70.2 -Release: 3%{?dist} +Version: 0.71.92 +Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources -License: LGPLv3+ and MIT +License: GPL-3.0-or-later AND LGPL-3.0-or-later and MIT-open-group AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.70/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.71/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Feb 15 2023 David King - 0.71.92-1 +- Update to 0.71.92 + * Sat Jan 21 2023 Fedora Release Engineering - 0.70.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From de03576168f1ec4beeb7330239f4debf3234b842 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 9 Mar 2023 12:01:10 +0000 Subject: [PATCH 037/102] Update to 0.71.99 --- .gitignore | 1 + sources | 2 +- vte291.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c2b9ed1..070164c 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,4 @@ /vte-0.70.1.tar.xz /vte-0.70.2.tar.xz /vte-0.71.92.tar.xz +/vte-0.71.99.tar.xz diff --git a/sources b/sources index 3ca1d8d..679af83 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.71.92.tar.xz) = 7711607b4a0a28bdcf0d73be46dff206c40baa4b5e0b32c32b517114e9fbe2050a76150d5da48429644dc7765172101a910cdd74166c7c28cea07e0af6ca56a3 +SHA512 (vte-0.71.99.tar.xz) = 3ff6d924a3921737e9e1d29d006c3d5bfa1114621f0b1b403406c6ceba982661d21d91f65fc9eeb89958302610ca5f8a8f41421a1fd849817f62d3465622026f diff --git a/vte291.spec b/vte291.spec index f6ab735..5ba6e5e 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.71.92 +Version: 0.71.99 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Thu Mar 09 2023 David King - 0.71.99-1 +- Update to 0.71.99 + * Wed Feb 15 2023 David King - 0.71.92-1 - Update to 0.71.92 From 44a011ad2c2c775c6c8d5de6e7af4e13eb334333 Mon Sep 17 00:00:00 2001 From: David King Date: Mon, 20 Mar 2023 12:02:22 +0000 Subject: [PATCH 038/102] Update to 0.72.0 (#2179642) --- .gitignore | 2 + sources | 2 +- vte291-cntnr-precmd-preexec-scroll.patch | 153 ++++++++++++----------- vte291.spec | 7 +- 4 files changed, 86 insertions(+), 78 deletions(-) diff --git a/.gitignore b/.gitignore index 070164c..8dd4aac 100644 --- a/.gitignore +++ b/.gitignore @@ -89,3 +89,5 @@ /vte-0.70.2.tar.xz /vte-0.71.92.tar.xz /vte-0.71.99.tar.xz +/vte-0.72.0.tar.bz2 +/vte-0.72.0.tar.xz diff --git a/sources b/sources index 679af83..c63a6c3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.71.99.tar.xz) = 3ff6d924a3921737e9e1d29d006c3d5bfa1114621f0b1b403406c6ceba982661d21d91f65fc9eeb89958302610ca5f8a8f41421a1fd849817f62d3465622026f +SHA512 (vte-0.72.0.tar.xz) = df6713b260491e55c6c9f92842d62020711d77c81ee67f41f79182e436f83c588e8fb87b6d2d07e33ba561f6544274cae895a9d5a0977fcbf48bece55579a42f diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index dbc727f..06baac5 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,4 +1,4 @@ -From 3354db2ca10487dd6ced2c54130b12e3a7bc53f8 Mon Sep 17 00:00:00 2001 +From 229a985c1ce90d5a7b493dad1261dd72a25e910c Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 01/11] Add sequences and signals for desktop notification @@ -36,10 +36,10 @@ index 241128c3..4412cf3d 100644 VOID:STRING,UINT VOID:UINT,UINT diff --git a/src/vte.cc b/src/vte.cc -index a8671845..77533d82 100644 +index 92b19fc8..03868606 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10164,6 +10164,16 @@ Terminal::emit_pending_signals() +@@ -10191,6 +10191,16 @@ Terminal::emit_pending_signals() emit_adjustment_changed(); @@ -57,7 +57,7 @@ index a8671845..77533d82 100644 if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 78176f97..ac762498 100644 +index 69b26ac3..13caec60 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -109,9 +109,11 @@ struct _VteTerminalClass { @@ -74,10 +74,10 @@ index 78176f97..ac762498 100644 /* Add new vfuncs here, and subtract from the padding below. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 3945ba67..570f8e69 100644 +index 59b74367..e9af14d1 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1251,6 +1251,9 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1263,6 +1263,9 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->child_exited = NULL; klass->encoding_changed = NULL; klass->char_size_changed = NULL; @@ -87,7 +87,7 @@ index 3945ba67..570f8e69 100644 klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1334,6 +1337,28 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1346,6 +1349,28 @@ vte_terminal_class_init(VteTerminalClass *klass) G_OBJECT_CLASS_TYPE(klass), g_cclosure_marshal_VOID__INTv); @@ -233,10 +233,10 @@ index 874d2405..dda487c4 100644 default: break; -- -2.37.3 +2.40.0 -From ca0549eafe1fd03d11a632d07c0fab7fd4b333ac Mon Sep 17 00:00:00 2001 +From 74a4ad9c4472c9c628945c336ca1bfb535b105d6 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND @@ -269,20 +269,20 @@ index 242d6c42..50242223 100644 } -- -2.37.3 +2.40.0 -From b281275ed320f9a2f82d6e436a397ad005dafce0 Mon Sep 17 00:00:00 2001 +From e67e4455cc51f9d272abd17770ae3cd395932695 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 Subject: [PATCH 03/11] Test the notification-received signal --- - src/app/app.cc | 10 ++++++++++ - 1 file changed, 10 insertions(+) + src/app/app.cc | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/app.cc b/src/app/app.cc -index a69d9327..88fe5f2f 100644 +index a69d9327..29e0e953 100644 --- a/src/app/app.cc +++ b/src/app/app.cc @@ -2286,6 +2286,14 @@ window_window_title_changed_cb(VteTerminal* terminal, @@ -300,20 +300,23 @@ index a69d9327..88fe5f2f 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2582,6 +2590,8 @@ vteapp_window_constructed(GObject *object) +@@ -2582,8 +2590,10 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); +- /* Settings */ + #if VTE_GTK == 3 + g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); + - /* Settings */ - #if VTE_GTK == 3 ++ /* Settings */ if (options.no_double_buffer) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + gtk_widget_set_double_buffered(GTK_WIDGET(window->terminal), false); -- -2.37.3 +2.40.0 -From 2832ac1e0bf8eb3e0147b0803637765a4b5ac832 Mon Sep 17 00:00:00 2001 +From 2514b0691278b74cab734cf29a47c7a86b138f5d Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 Subject: [PATCH 04/11] Add a property to configure the scroll speed @@ -331,10 +334,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1103380 5 files changed, 99 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index 77533d82..e2723342 100644 +index 03868606..1c9abbab 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -9364,6 +9364,9 @@ vte_cairo_get_clip_region(cairo_t *cr) +@@ -9391,6 +9391,9 @@ vte_cairo_get_clip_region(cairo_t *cr) bool Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) { @@ -344,7 +347,7 @@ index 77533d82..e2723342 100644 gdouble v; gint cnt, i; int button; -@@ -9398,7 +9401,17 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) +@@ -9425,7 +9428,17 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) return true; } @@ -362,7 +365,7 @@ index 77533d82..e2723342 100644 _vte_debug_print(VTE_DEBUG_EVENTS, "Scroll speed is %d lines per non-smooth scroll unit\n", (int) v); -@@ -9708,6 +9721,18 @@ Terminal::decscusr_cursor_shape() const noexcept +@@ -9735,6 +9748,18 @@ Terminal::decscusr_cursor_shape() const noexcept } } @@ -382,7 +385,7 @@ index 77533d82..e2723342 100644 Terminal::set_scrollback_lines(long lines) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index ac762498..972c4a0c 100644 +index 13caec60..5985dda2 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -330,6 +330,12 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, @@ -399,10 +402,10 @@ index ac762498..972c4a0c 100644 _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 570f8e69..a9f58696 100644 +index e9af14d1..835470f7 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1002,6 +1002,11 @@ try +@@ -1014,6 +1014,11 @@ try case PROP_REWRAP_ON_RESIZE: g_value_set_boolean (value, vte_terminal_get_rewrap_on_resize (terminal)); break; @@ -414,7 +417,7 @@ index 570f8e69..a9f58696 100644 case PROP_SCROLLBACK_LINES: g_value_set_uint (value, vte_terminal_get_scrollback_lines(terminal)); break; -@@ -1123,6 +1128,11 @@ try +@@ -1135,6 +1140,11 @@ try case PROP_REWRAP_ON_RESIZE: vte_terminal_set_rewrap_on_resize (terminal, g_value_get_boolean (value)); break; @@ -426,7 +429,7 @@ index 570f8e69..a9f58696 100644 case PROP_SCROLLBACK_LINES: vte_terminal_set_scrollback_lines (terminal, g_value_get_uint (value)); break; -@@ -2223,6 +2233,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2235,6 +2245,23 @@ vte_terminal_class_init(VteTerminalClass *klass) TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -450,7 +453,7 @@ index 570f8e69..a9f58696 100644 /** * VteTerminal:scrollback-lines: * -@@ -5958,6 +5985,38 @@ catch (...) +@@ -6060,6 +6087,38 @@ catch (...) return -1; } @@ -528,10 +531,10 @@ index 8dba726c..4629c95f 100644 bool set_fallback_scrolling(bool set); auto fallback_scrolling() const noexcept { return m_fallback_scrolling; } -- -2.37.3 +2.40.0 -From 10f3d37fdc465152b805e54d3217a61d69e4c255 Mon Sep 17 00:00:00 2001 +From 431763fb3dc23ffc0144c8739d9b898bf7a436f4 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 Subject: [PATCH 05/11] Test the scroll-speed property @@ -542,7 +545,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1103380 1 file changed, 10 insertions(+) diff --git a/src/app/app.cc b/src/app/app.cc -index 88fe5f2f..49a1689d 100644 +index 29e0e953..a3cc9257 100644 --- a/src/app/app.cc +++ b/src/app/app.cc @@ -118,6 +118,9 @@ public: @@ -577,10 +580,10 @@ index 88fe5f2f..49a1689d 100644 vte_terminal_set_scrollback_lines(window->terminal, options.scrollback_lines); vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); -- -2.37.3 +2.40.0 -From d2f139cc2f440a390bec6438a4292b50213f5818 Mon Sep 17 00:00:00 2001 +From e20d22a23be7383f8114dc59598be6c8a9bb73a0 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 Subject: [PATCH 06/11] Support preexec notifications from an interactive shell @@ -609,10 +612,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index e2723342..766b7624 100644 +index 1c9abbab..32d3315a 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10197,6 +10197,12 @@ Terminal::emit_pending_signals() +@@ -10224,6 +10224,12 @@ Terminal::emit_pending_signals() m_notification_summary.c_str(), m_notification_body.c_str()); } @@ -642,7 +645,7 @@ index 50242223..01b44e23 100644 elif [[ -n "${ZSH_VERSION:-}" ]]; then diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 972c4a0c..8bdd3ccf 100644 +index 5985dda2..d6721a52 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -110,10 +110,11 @@ struct _VteTerminalClass { @@ -659,10 +662,10 @@ index 972c4a0c..8bdd3ccf 100644 /* Add new vfuncs here, and subtract from the padding below. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index a9f58696..797865db 100644 +index 835470f7..8dd7ea50 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1263,6 +1263,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1275,6 +1275,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->char_size_changed = NULL; #if _VTE_GTK == 3 klass->notification_received = NULL; @@ -670,7 +673,7 @@ index a9f58696..797865db 100644 #endif klass->window_title_changed = NULL; klass->icon_title_changed = NULL; -@@ -1367,6 +1368,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1379,6 +1380,23 @@ vte_terminal_class_init(VteTerminalClass *klass) _vte_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -734,10 +737,10 @@ index dda487c4..f2c86b2c 100644 #endif -- -2.37.3 +2.40.0 -From 05425620f9e65704eec774cd567e15f5e385f89d Mon Sep 17 00:00:00 2001 +From b3b23900327e439b50b29372ee89ce887e1c4d06 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 Subject: [PATCH 07/11] Test the shell-preexec signal @@ -749,7 +752,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 1 file changed, 7 insertions(+) diff --git a/src/app/app.cc b/src/app/app.cc -index 49a1689d..90b2dfe5 100644 +index a3cc9257..813b6d1d 100644 --- a/src/app/app.cc +++ b/src/app/app.cc @@ -2301,6 +2301,12 @@ notification_received_cb(VteTerminal *terminal, @@ -765,19 +768,19 @@ index 49a1689d..90b2dfe5 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2598,6 +2604,7 @@ vteapp_window_constructed(GObject *object) - g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); +@@ -2599,6 +2605,7 @@ vteapp_window_constructed(GObject *object) + #if VTE_GTK == 3 g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); + g_signal_connect(window->terminal, "shell-preexec", G_CALLBACK(shell_preexec_cb), NULL); /* Settings */ - #if VTE_GTK == 3 + if (options.no_double_buffer) { -- -2.37.3 +2.40.0 -From 57dd88ebfe1b3df1bafe7fd904dd0df7c1094f59 Mon Sep 17 00:00:00 2001 +From 2058ed67cd3d427fb06a25c58c69bf9d9ae35a5e Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 08/11] Support precmd notifications from an interactive shell @@ -806,10 +809,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 766b7624..6cef7b17 100644 +index 32d3315a..98e60fcc 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10203,6 +10203,12 @@ Terminal::emit_pending_signals() +@@ -10230,6 +10230,12 @@ Terminal::emit_pending_signals() "Emitting `shell-preexec'.\n"); g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); } @@ -836,7 +839,7 @@ index 01b44e23..877fe93d 100644 } diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 8bdd3ccf..31bb3b75 100644 +index d6721a52..e488dc40 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -110,11 +110,8 @@ struct _VteTerminalClass { @@ -853,10 +856,10 @@ index 8bdd3ccf..31bb3b75 100644 /* Add new vfuncs here, and subtract from the padding below. */ diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 797865db..bd3a8798 100644 +index 8dd7ea50..00045f3a 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1263,6 +1263,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1275,6 +1275,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->char_size_changed = NULL; #if _VTE_GTK == 3 klass->notification_received = NULL; @@ -864,7 +867,7 @@ index 797865db..bd3a8798 100644 klass->shell_preexec = NULL; #endif klass->window_title_changed = NULL; -@@ -1369,6 +1370,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1381,6 +1382,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -928,10 +931,10 @@ index f2c86b2c..bae18595 100644 } } -- -2.37.3 +2.40.0 -From 089580a09de21160f871875fe960e895bc5b5bc2 Mon Sep 17 00:00:00 2001 +From 468a91b1d8fe95f3bd814361777dd171b9de3df6 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 09/11] Test the shell-precmd signal @@ -943,7 +946,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 1 file changed, 7 insertions(+) diff --git a/src/app/app.cc b/src/app/app.cc -index 90b2dfe5..5c4946c9 100644 +index 813b6d1d..eb962e86 100644 --- a/src/app/app.cc +++ b/src/app/app.cc @@ -2301,6 +2301,12 @@ notification_received_cb(VteTerminal *terminal, @@ -959,19 +962,19 @@ index 90b2dfe5..5c4946c9 100644 static void shell_preexec_cb(VteTerminal *terminal) { -@@ -2604,6 +2610,7 @@ vteapp_window_constructed(GObject *object) - g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); +@@ -2605,6 +2611,7 @@ vteapp_window_constructed(GObject *object) + #if VTE_GTK == 3 g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); + g_signal_connect(window->terminal, "shell-precmd", G_CALLBACK(shell_precmd_cb), NULL); g_signal_connect(window->terminal, "shell-preexec", G_CALLBACK(shell_preexec_cb), NULL); /* Settings */ -- -2.37.3 +2.40.0 -From 2e940b5a720dea9a06fd47862381f27f765f76dd Mon Sep 17 00:00:00 2001 +From 329db6eea1479a91f7de428d0b97173f67348b7c Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 10/11] Support tracking the active container inside the @@ -1013,10 +1016,10 @@ agreed upon across multiple different terminal emulators [1]. 6 files changed, 211 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index 6cef7b17..21823424 100644 +index 98e60fcc..92ab5711 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10209,6 +10209,14 @@ Terminal::emit_pending_signals() +@@ -10236,6 +10236,14 @@ Terminal::emit_pending_signals() "Emitting `shell-precmd'.\n"); g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PRECMD], 0); } @@ -1032,10 +1035,10 @@ index 6cef7b17..21823424 100644 if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 31bb3b75..12ecf181 100644 +index e488dc40..b1c70824 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -551,6 +551,12 @@ _VTE_PUBLIC +@@ -566,6 +566,12 @@ _VTE_PUBLIC glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); _VTE_PUBLIC const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); @@ -1049,10 +1052,10 @@ index 31bb3b75..12ecf181 100644 const char *vte_terminal_get_current_directory_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); _VTE_PUBLIC diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index bd3a8798..0457b2b9 100644 +index 00045f3a..83ea636e 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -951,6 +951,14 @@ try +@@ -963,6 +963,14 @@ try case PROP_CURSOR_BLINK_MODE: g_value_set_enum (value, vte_terminal_get_cursor_blink_mode (terminal)); break; @@ -1067,7 +1070,7 @@ index bd3a8798..0457b2b9 100644 case PROP_CURRENT_DIRECTORY_URI: g_value_set_string (value, vte_terminal_get_current_directory_uri (terminal)); break; -@@ -2376,6 +2384,29 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2388,6 +2396,29 @@ vte_terminal_class_init(VteTerminalClass *klass) NULL, (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -1097,7 +1100,7 @@ index bd3a8798..0457b2b9 100644 /** * VteTerminal:current-directory-uri: * -@@ -5129,6 +5160,58 @@ catch (...) +@@ -5204,6 +5235,58 @@ catch (...) return -1; } @@ -1339,10 +1342,10 @@ index bae18595..8a7f5b34 100644 ++token; -- -2.37.3 +2.40.0 -From f15bfe821e0deefcf62d649c27e73b802f5338f0 Mon Sep 17 00:00:00 2001 +From d1db595d6e91bd21dfc4ced7d6ae81ad851a20e9 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region @@ -1358,10 +1361,10 @@ This reverts commit 73713ec0644e232fb740170e399282be778d97f9. 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 21823424..20767b61 100644 +index 92ab5711..9527148c 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -6525,10 +6525,7 @@ Terminal::maybe_end_selection() +@@ -6552,10 +6552,7 @@ Terminal::maybe_end_selection() /* * Terminal::select_all: * @@ -1373,7 +1376,7 @@ index 21823424..20767b61 100644 */ void Terminal::select_all() -@@ -6537,8 +6534,8 @@ Terminal::select_all() +@@ -6564,8 +6561,8 @@ Terminal::select_all() m_selecting_had_delta = TRUE; @@ -1385,5 +1388,5 @@ index 21823424..20767b61 100644 _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); -- -2.37.3 +2.40.0 diff --git a/vte291.spec b/vte291.spec index 5ba6e5e..7097c27 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.71.99 +Version: 0.72.0 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -19,7 +19,7 @@ Summary: GTK+ 3 terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later and MIT-open-group AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.71/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.72/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Mar 20 2023 David King - 0.72.0-1 +- Update to 0.72.0 (#2179642) + * Thu Mar 09 2023 David King - 0.71.99-1 - Update to 0.71.99 From 3a1f2a7247281424c850a653c4b06cca3c7842c2 Mon Sep 17 00:00:00 2001 From: David King Date: Sun, 16 Apr 2023 14:12:19 +0100 Subject: [PATCH 039/102] Update to 0.72.1 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8dd4aac..b6fc37f 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,4 @@ /vte-0.71.99.tar.xz /vte-0.72.0.tar.bz2 /vte-0.72.0.tar.xz +/vte-0.72.1.tar.bz2 diff --git a/sources b/sources index c63a6c3..f0ec00b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.72.0.tar.xz) = df6713b260491e55c6c9f92842d62020711d77c81ee67f41f79182e436f83c588e8fb87b6d2d07e33ba561f6544274cae895a9d5a0977fcbf48bece55579a42f +SHA512 (vte-0.72.1.tar.bz2) = a5655d2d2602183cbda1050003d7cf883e427c8e00976af4ee2685f43530d87169e31a3b9597133d14dffdc95f20f9ca1488186d8463997a2672510f5a95d145 diff --git a/vte291.spec b/vte291.spec index 7097c27..430d1ff 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.72.0 +Version: 0.72.1 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -19,7 +19,7 @@ Summary: GTK+ 3 terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later and MIT-open-group AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.72/vte-%{version}.tar.xz +Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sun Apr 16 2023 David King - 0.72.1-1 +- Update to 0.72.1 + * Mon Mar 20 2023 David King - 0.72.0-1 - Update to 0.72.0 (#2179642) From d8b290cd128c42b59fc615aab47154c79b913906 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 7 Jun 2023 14:59:55 +0200 Subject: [PATCH 040/102] Update to 0.72.2 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b6fc37f..3e328bf 100644 --- a/.gitignore +++ b/.gitignore @@ -92,3 +92,4 @@ /vte-0.72.0.tar.bz2 /vte-0.72.0.tar.xz /vte-0.72.1.tar.bz2 +/vte-0.72.2.tar.xz diff --git a/sources b/sources index f0ec00b..d2b0b8b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.72.1.tar.bz2) = a5655d2d2602183cbda1050003d7cf883e427c8e00976af4ee2685f43530d87169e31a3b9597133d14dffdc95f20f9ca1488186d8463997a2672510f5a95d145 +SHA512 (vte-0.72.2.tar.xz) = 40562ca7c925d9b1f6937d5aceb1d0d8852339d3455569aaf92a684fe7c785f0c4023dbbc0f6f60ceb17a5e70ca41587ae0bd153bdc2d3cb27951f8b20598f44 diff --git a/vte291.spec b/vte291.spec index 430d1ff..90e7b35 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.72.1 +Version: 0.72.2 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -19,7 +19,7 @@ Summary: GTK+ 3 terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later and MIT-open-group AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 +Source0: https://download.gnome.org/sources/vte/0.72/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Jun 07 2023 Kalev Lember - 0.72.2-1 +- Update to 0.72.2 + * Sun Apr 16 2023 David King - 0.72.1-1 - Update to 0.72.1 From 5746c31a98a0cb139f81bf70d0b8542c6681daa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Tue, 11 Jul 2023 22:23:16 +0200 Subject: [PATCH 041/102] Rebuilt for ICU 73.2 --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 90e7b35..bd7b9f4 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.72.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Tue Jul 11 2023 František Zatloukal - 0.72.2-2 +- Rebuilt for ICU 73.2 + * Wed Jun 07 2023 Kalev Lember - 0.72.2-1 - Update to 0.72.2 From f09a3123a4631523ecddb5860c95a68cda45499c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 17:54:05 +0000 Subject: [PATCH 042/102] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index bd7b9f4..7164bd9 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.72.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 0.72.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jul 11 2023 František Zatloukal - 0.72.2-2 - Rebuilt for ICU 73.2 From 83e045ed72c695c811588293fc70ea5a8cbf7dba Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 8 Aug 2023 02:17:48 +0200 Subject: [PATCH 043/102] Update to 0.73.93 --- .gitignore | 1 + sources | 2 +- vte291.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 3e328bf..680435d 100644 --- a/.gitignore +++ b/.gitignore @@ -93,3 +93,4 @@ /vte-0.72.0.tar.xz /vte-0.72.1.tar.bz2 /vte-0.72.2.tar.xz +/vte-0.73.93.tar.xz diff --git a/sources b/sources index d2b0b8b..c86570e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.72.2.tar.xz) = 40562ca7c925d9b1f6937d5aceb1d0d8852339d3455569aaf92a684fe7c785f0c4023dbbc0f6f60ceb17a5e70ca41587ae0bd153bdc2d3cb27951f8b20598f44 +SHA512 (vte-0.73.93.tar.xz) = c9ad855876a85885d9d4a7a1a2b7f4e193e3473314c28a492b47778cf3f418864a50f677757760f602e603daa44fc143d645f082cfa65ab6302d11192c7e0abf diff --git a/vte291.spec b/vte291.spec index 7164bd9..00c4307 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,15 +11,15 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.72.2 -Release: 3%{?dist} +Version: 0.73.93 +Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources License: GPL-3.0-or-later AND LGPL-3.0-or-later and MIT-open-group AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.72/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.73/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Tue Aug 08 2023 Kalev Lember - 0.73.93-1 +- Update to 0.73.93 + * Sat Jul 22 2023 Fedora Release Engineering - 0.72.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 44829b00d41e3097d1a44910d4d49c659555e777 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 20 Sep 2023 00:01:30 +0200 Subject: [PATCH 044/102] Update to 0.74.0 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 680435d..1af4d3f 100644 --- a/.gitignore +++ b/.gitignore @@ -94,3 +94,4 @@ /vte-0.72.1.tar.bz2 /vte-0.72.2.tar.xz /vte-0.73.93.tar.xz +/vte-0.74.0.tar.xz diff --git a/sources b/sources index c86570e..c1ed96e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.73.93.tar.xz) = c9ad855876a85885d9d4a7a1a2b7f4e193e3473314c28a492b47778cf3f418864a50f677757760f602e603daa44fc143d645f082cfa65ab6302d11192c7e0abf +SHA512 (vte-0.74.0.tar.xz) = 4e33c0545641e553ec5b8b2fe0a953f1b4ee28e4e9598753eef3a4a72e7ee19bbae788cc31b7473ed14eb494eb5f5b32f186591339f213af194ce4b6b20b5929 diff --git a/vte291.spec b/vte291.spec index 00c4307..e2dfa06 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.73.93 +Version: 0.74.0 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -19,7 +19,7 @@ Summary: GTK+ 3 terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later and MIT-open-group AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.73/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.74/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Tue Sep 19 2023 Kalev Lember - 0.74.0-1 +- Update to 0.74.0 + * Tue Aug 08 2023 Kalev Lember - 0.73.93-1 - Update to 0.73.93 From 486e715ea36f9a46101588a4801c67cf23684d3d Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sun, 22 Oct 2023 23:06:41 +0200 Subject: [PATCH 045/102] Update to 0.74.1 --- .gitignore | 1 + sources | 2 +- vte291.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1af4d3f..5a2786d 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,4 @@ /vte-0.72.2.tar.xz /vte-0.73.93.tar.xz /vte-0.74.0.tar.xz +/vte-0.74.1.tar.xz diff --git a/sources b/sources index c1ed96e..95f3fa6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.74.0.tar.xz) = 4e33c0545641e553ec5b8b2fe0a953f1b4ee28e4e9598753eef3a4a72e7ee19bbae788cc31b7473ed14eb494eb5f5b32f186591339f213af194ce4b6b20b5929 +SHA512 (vte-0.74.1.tar.xz) = e193422d4ba197a733033d0e10d1b6906798e165fb85b73e66c8941d0b85ff8aaac56c1cfcb1cb7da598fd2e54d3850368c6ea323c97a9f59cb048a03042eecb diff --git a/vte291.spec b/vte291.spec index e2dfa06..30214ce 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.74.0 +Version: 0.74.1 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sun Oct 22 2023 Kalev Lember - 0.74.1-1 +- Update to 0.74.1 + * Tue Sep 19 2023 Kalev Lember - 0.74.0-1 - Update to 0.74.0 From effdc88925f27e048c767ea2ca951ef453d4c4b2 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sat, 16 Dec 2023 23:57:48 +0100 Subject: [PATCH 046/102] Update to 0.74.2 --- .gitignore | 1 + sources | 2 +- vte291.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5a2786d..4e6e3c6 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,4 @@ /vte-0.73.93.tar.xz /vte-0.74.0.tar.xz /vte-0.74.1.tar.xz +/vte-0.74.2.tar.xz diff --git a/sources b/sources index 95f3fa6..80a3728 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.74.1.tar.xz) = e193422d4ba197a733033d0e10d1b6906798e165fb85b73e66c8941d0b85ff8aaac56c1cfcb1cb7da598fd2e54d3850368c6ea323c97a9f59cb048a03042eecb +SHA512 (vte-0.74.2.tar.xz) = a4f9cf8560a062d05eeac41d3a97ae58ea3b9b136faece0e8d16dacebd0f5d9ed7a91f724c643ce7377aad130268a71cbe611909977717d0f3af7601112d67f5 diff --git a/vte291.spec b/vte291.spec index 30214ce..308a24f 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.74.1 +Version: 0.74.2 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sat Dec 16 2023 Kalev Lember - 0.74.2-1 +- Update to 0.74.2 + * Sun Oct 22 2023 Kalev Lember - 0.74.1-1 - Update to 0.74.1 From 0e78f508727be1df88b0bb40ad2aa4ee0721b5b4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 08:15:53 +0000 Subject: [PATCH 047/102] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 308a24f..c8af9e5 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.74.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 0.74.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Dec 16 2023 Kalev Lember - 0.74.2-1 - Update to 0.74.2 From 3113f966e99eb2f546fd59224c8cd4ee9ac2ee3f Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Wed, 31 Jan 2024 20:25:28 +0000 Subject: [PATCH 048/102] Rebuild for ICU 74 --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index c8af9e5..10564ef 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.74.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Jan 31 2024 Pete Walter - 0.74.2-3 +- Rebuild for ICU 74 + * Sat Jan 27 2024 Fedora Release Engineering - 0.74.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 4edddd0d235e43e9518759e747a9dd177652161b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Thu, 25 Jan 2024 11:17:52 +0000 Subject: [PATCH 049/102] Migrate to SPDX license One line was already in SPDX, but with lowercase operator - they must be uppercase. Rest was in Callaway form. I corrected the MIT license and added X11, which is used in COPYING.XTERM This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_3 --- vte291.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vte291.spec b/vte291.spec index 10564ef..1056963 100644 --- a/vte291.spec +++ b/vte291.spec @@ -16,7 +16,7 @@ Release: 3%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources -License: GPL-3.0-or-later AND LGPL-3.0-or-later and MIT-open-group AND CC-BY-4.0 +License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE Source0: https://download.gnome.org/sources/vte/0.74/vte-%{version}.tar.xz @@ -82,7 +82,7 @@ Summary: Development files for GTK+ 3 %{name} # vte-2.91 is generated from GPLv3+ sources, while the public headers are # LGPLv3+ -License: GPLv3+ and LGPLv3+ +License: GPL-3.0-or-later AND LGPL-3.0-or-later Requires: %{name}%{?_isa} = %{version}-%{release} @@ -95,7 +95,7 @@ Summary: Development files for GTK 4 %{name} # vte-2.91 is generated from GPLv3+ sources, while the public headers are # LGPLv3+ -License: GPLv3+ and LGPLv3+ +License: GPL-3.0-or-later AND LGPL-3.0-or-later Requires: %{name}-gtk4%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release} @@ -110,7 +110,7 @@ developing GTK 4 applications that use %{name}. # of the multilib packages (i686 + x86_64) as the replacement. %package -n vte-profile Summary: Profile script for VTE terminal emulator library -License: GPLv3+ +License: GPL-3.0-or-later # vte.sh was previously part of the vte3 package Conflicts: vte3 < 0.36.1-3 From 3d3acf0be097546ed7f45e8a5584616961008381 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Mon, 12 Feb 2024 10:49:52 +0100 Subject: [PATCH 050/102] Build for the SPDX license format change --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 1056963..98b17f4 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.74.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Feb 12 2024 Tomas Popela - 0.74.2-4 +- Build for the SPDX license format change + * Wed Jan 31 2024 Pete Walter - 0.74.2-3 - Rebuild for ICU 74 From ae73dd4d48b9c0913142056154e1ebd1cc3bfbd8 Mon Sep 17 00:00:00 2001 From: David King Date: Tue, 2 Apr 2024 14:34:18 +0100 Subject: [PATCH 051/102] Update to 0.76.0 Incorporate Christian Hergert's accessibility changes, as well as refreshing the notification patches. --- .gitignore | 1 + sources | 2 +- vte291-cntnr-precmd-preexec-scroll.patch | 1686 +++++++++++++++++++--- vte291.spec | 13 +- 4 files changed, 1510 insertions(+), 192 deletions(-) diff --git a/.gitignore b/.gitignore index 4e6e3c6..8e09438 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,4 @@ /vte-0.74.0.tar.xz /vte-0.74.1.tar.xz /vte-0.74.2.tar.xz +/vte-0.76.0.tar.xz diff --git a/sources b/sources index 80a3728..532790f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.74.2.tar.xz) = a4f9cf8560a062d05eeac41d3a97ae58ea3b9b136faece0e8d16dacebd0f5d9ed7a91f724c643ce7377aad130268a71cbe611909977717d0f3af7601112d67f5 +SHA512 (vte-0.76.0.tar.xz) = 4eccdac2eeb33ae76c67000081b3ae26b0872ac3c1b89517db87a1574dc1121992ad708a0ffced34e30a0fd351166552215cf897d722b53d2313d5b8deed2385 diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index 06baac5..c0a6ace 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -1,7 +1,1332 @@ -From 229a985c1ce90d5a7b493dad1261dd72a25e910c Mon Sep 17 00:00:00 2001 +From aace6f9a1f217be6496a3df0833bf1cd9841bf24 Mon Sep 17 00:00:00 2001 +From: Christian Hergert +Date: Tue, 2 Apr 2024 11:25:40 +0100 +Subject: [PATCH 01/12] a11y: implement GtkAccessibleText + +This is an initial implementaiton of GtkAccessibleText which was added +to GTK for 4.14. It attempts to implement things in a very similar +fashion to the previous code for GTK 3 although considerable effort was +made to simplify and improve readability as to how it works. + +Currently, this supports reading back what you type and what has changed +on screen. It is not yet 1:1 what the GTK 3 a11y implementation did +because ATK was doing many other things (including proxying keyboard +keys) to the other side of the a11y bus. That appears to improve +readback by screen readers in the form of "backspace" and what character +was deleted. + +I expect things to get closer to 1:1 but that work is going to have to +be done inside of GTK itself first and should not require much if +anything here. + +A new VteTerminal:enable-a11y feature flag property has been added +because I'm concerned about enabling this by default until the a11y bus +learns to be more lazy. Currently there is no way to "do nothing" until +a peer (e.g. screenreader) is interested in the contents. + +Ideally, we would have a short-circuit like is currently implemented by +checking vte_terminal_get_enable_a11y() to avoid any sort of contents +calculation when there are no a11y observers. + +It also allows disabling the GTK 3 a11y implementation just to keep some +symmetry between the APIs. + +Currently, this does not implement "text-scrolled" like the GTK 3 +implementation does as I'm not sure yet if there is a benefit. +--- + src/meson.build | 13 +- + src/vte.cc | 11 + + src/vte/vteterminal.h | 7 + + src/vteaccess-gtk4.cc | 874 ++++++++++++++++++++++++++++++++++++++++++ + src/vteaccess-gtk4.h | 25 ++ + src/vteaccess.cc | 21 + + src/vtegtk.cc | 97 ++++- + src/vtegtk.hh | 1 + + src/vteinternal.hh | 8 + + 9 files changed, 1050 insertions(+), 7 deletions(-) + create mode 100644 src/vteaccess-gtk4.cc + create mode 100644 src/vteaccess-gtk4.h + +diff --git a/src/meson.build b/src/meson.build +index 3f89f492..6d1b4b2b 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -18,11 +18,16 @@ subdir('vte') + + src_inc = include_directories('.') + +-a11y_sources = files( ++a11y_gtk3_sources = files( + 'vteaccess.cc', + 'vteaccess.h', + ) + ++a11y_gtk4_sources = files( ++ 'vteaccess-gtk4.cc', ++ 'vteaccess-gtk4.h', ++) ++ + debug_sources = files( + 'debug.cc', + 'debug.h', +@@ -300,7 +305,7 @@ if get_option('gtk3') + libvte_gtk3_public_deps = libvte_common_public_deps + [gtk3_dep,] + + if get_option('a11y') +- libvte_gtk3_sources += a11y_sources ++ libvte_gtk3_sources += a11y_gtk3_sources + endif + + libvte_gtk3 = shared_library( +@@ -349,6 +354,10 @@ if get_option('gtk4') + libvte_gtk4_deps = libvte_common_deps + [gtk4_dep,] + libvte_gtk4_public_deps = libvte_common_public_deps + [gtk4_dep,] + ++ if get_option('a11y') ++ libvte_gtk4_sources += a11y_gtk4_sources ++ endif ++ + libvte_gtk4 = shared_library( + vte_gtk4_api_name, + sources: libvte_gtk4_sources, +diff --git a/src/vte.cc b/src/vte.cc +index b3bcc0a6..6f5ed505 100644 +--- a/src/vte.cc ++++ b/src/vte.cc +@@ -10134,6 +10134,17 @@ Terminal::set_text_blink_mode(TextBlinkMode setting) + return true; + } + ++bool ++Terminal::set_enable_a11y(bool setting) ++{ ++ if (setting == m_enable_a11y) ++ return false; ++ ++ m_enable_a11y = setting; ++ ++ return true; ++} ++ + bool + Terminal::set_enable_bidi(bool setting) + { +diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h +index a9e1e494..33360909 100644 +--- a/src/vte/vteterminal.h ++++ b/src/vte/vteterminal.h +@@ -388,6 +388,13 @@ _VTE_PUBLIC + void vte_terminal_set_delete_binding(VteTerminal *terminal, + VteEraseBinding binding) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); + ++/* Accessibility */ ++_VTE_PUBLIC ++void vte_terminal_set_enable_a11y(VteTerminal *terminal, ++ gboolean enable_a11y) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); ++_VTE_PUBLIC ++gboolean vte_terminal_get_enable_a11y(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); ++ + /* BiDi and shaping */ + _VTE_PUBLIC + void vte_terminal_set_enable_bidi(VteTerminal *terminal, +diff --git a/src/vteaccess-gtk4.cc b/src/vteaccess-gtk4.cc +new file mode 100644 +index 00000000..f42e7578 +--- /dev/null ++++ b/src/vteaccess-gtk4.cc +@@ -0,0 +1,874 @@ ++/* ++ * Copyright © 2024 Christian Hergert ++ * Copyright © 2002,2003 Red Hat, Inc. ++ * ++ * This library is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as published ++ * by the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public License ++ * along with this library. If not, see . ++ */ ++ ++#include "config.h" ++ ++#include "vteinternal.hh" ++#include "vteaccess-gtk4.h" ++ ++#define GDK_ARRAY_NAME char_positions ++#define GDK_ARRAY_TYPE_NAME CharPositions ++#define GDK_ARRAY_ELEMENT_TYPE int ++#define GDK_ARRAY_BY_VALUE 1 ++#define GDK_ARRAY_PREALLOC 8 ++#define GDK_ARRAY_NO_MEMSET ++#include "gdkarrayimpl.c" ++ ++typedef struct _VteAccessibleTextContents ++{ ++ /* A GdkArrayImpl of attributes per byte */ ++ VteCharAttrList attrs; ++ ++ /* The byte position within the UTF-8 string where each visible ++ * character starts. ++ */ ++ CharPositions characters; ++ ++ /* The character position within the UTF-8 string where each line ++ * break occurs. To get byte offset, use @characters. ++ */ ++ CharPositions linebreaks; ++ ++ /* The UTF-8 string encoded as bytes so that we may reference it ++ * using GBytes for "substrings". However @string does include a ++ * trailing NUL byte in it's size so that the a11y infrastructure ++ * may elide some string copies. ++ */ ++ GBytes *string; ++ ++ /* Number of bytes in @string excluding trailing NUL. */ ++ gsize n_bytes; ++ ++ /* Number of unicode characters in @string. */ ++ gsize n_chars; ++ ++ /* The character position (not bytes) of the caret in @string */ ++ gsize caret; ++ ++ /* Cached column/row of the caret updated each time we are notified ++ * of the caret having moved. We cache this so that we can elide ++ * extraneous notifications after snapshoting. We will update the ++ * carent position synchronously when notified so @caret may always ++ * be relied upon as correct. ++ */ ++ long cached_caret_column; ++ long cached_caret_row; ++} VteAccessibleTextContents; ++ ++typedef struct _VteAccessibleText ++{ ++ VteTerminal *terminal; ++ VteAccessibleTextContents contents[2]; ++ guint contents_flip : 1; ++} VteAccessibleText; ++ ++static inline gboolean ++_pango_color_equal(const PangoColor *a, ++ const PangoColor *b) ++{ ++ return a->red == b->red && ++ a->green == b->green && ++ a->blue == b->blue; ++} ++ ++static void ++vte_accessible_text_contents_init (VteAccessibleTextContents *contents) ++{ ++ vte_char_attr_list_init (&contents->attrs); ++ char_positions_init (&contents->characters); ++ char_positions_init (&contents->linebreaks); ++ contents->string = nullptr; ++ contents->n_bytes = 0; ++ contents->n_chars = 0; ++ contents->caret = 0; ++ contents->cached_caret_row = 0; ++ contents->cached_caret_column = 0; ++} ++ ++static void ++vte_accessible_text_contents_clear (VteAccessibleTextContents *contents) ++{ ++ vte_char_attr_list_clear (&contents->attrs); ++ char_positions_clear (&contents->characters); ++ char_positions_clear (&contents->linebreaks); ++ g_clear_pointer (&contents->string, g_bytes_unref); ++ contents->n_bytes = 0; ++ contents->n_chars = 0; ++ contents->caret = 0; ++ contents->cached_caret_row = 0; ++ contents->cached_caret_column = 0; ++} ++ ++static void ++vte_accessible_text_contents_reset (VteAccessibleTextContents *contents) ++{ ++ vte_char_attr_list_set_size (&contents->attrs, 0); ++ char_positions_set_size (&contents->characters, 0); ++ char_positions_set_size (&contents->linebreaks, 0); ++ g_clear_pointer (&contents->string, g_bytes_unref); ++ contents->n_bytes = 0; ++ contents->n_chars = 0; ++ contents->caret = 0; ++ contents->cached_caret_row = 0; ++ contents->cached_caret_column = 0; ++} ++ ++static const char * ++vte_accessible_text_contents_get_string (VteAccessibleTextContents *contents, ++ gsize *len) ++{ ++ const char *ret; ++ ++ if (contents->string == nullptr || g_bytes_get_size (contents->string) == 0) { ++ *len = 0; ++ return ""; ++ } ++ ++ ret = (const char *)g_bytes_get_data (contents->string, len); ++ ++ if (*len > 0) { ++ (*len)--; ++ } ++ ++ return ret; ++} ++ ++static int ++vte_accessible_text_contents_offset_from_xy (VteAccessibleTextContents *contents, ++ int x, ++ int y) ++{ ++ int offset; ++ int linebreak; ++ int next_linebreak; ++ ++ if (y >= int(char_positions_get_size (&contents->linebreaks))) { ++ y = int(char_positions_get_size (&contents->linebreaks)) - 1; ++ if (y < 0) { ++ return 0; ++ } ++ } ++ ++ linebreak = *char_positions_index (&contents->linebreaks, y); ++ if (y + 1 == int(char_positions_get_size (&contents->linebreaks))) { ++ next_linebreak = int(char_positions_get_size (&contents->characters)); ++ } else { ++ next_linebreak = *char_positions_index (&contents->linebreaks, y + 1); ++ } ++ ++ offset = linebreak + x; ++ if (offset >= next_linebreak) { ++ offset = next_linebreak - 1; ++ } ++ ++ return offset; ++} ++ ++static gunichar ++vte_accessible_text_contents_get_char_at (VteAccessibleTextContents *contents, ++ guint offset) ++{ ++ const char *str; ++ ++ if (contents->string == nullptr) ++ return 0; ++ ++ if (offset >= contents->n_chars) ++ return 0; ++ ++ g_assert (offset < char_positions_get_size (&contents->characters)); ++ ++ str = (const char *)g_bytes_get_data (contents->string, nullptr); ++ str += *char_positions_index (&contents->characters, offset); ++ ++ return g_utf8_get_char (str); ++ ++} ++ ++static GBytes * ++_g_string_free_to_bytes_with_nul (GString *str) ++{ ++ /* g_string_free_to_bytes() will have a trailing-NUL but not include it ++ * in the size of the GBytes. We want the size included in our GBytes ++ * so that GtkAccessibleText may avoid some copies. ++ */ ++ gsize len = str->len + 1; ++ return g_bytes_new_take (g_string_free (str, FALSE), len); ++} ++ ++static inline gsize ++vte_accessible_text_contents_find_caret (VteAccessibleTextContents *contents, ++ long ccol, ++ long crow) ++{ ++ g_assert (contents != nullptr); ++ ++ /* Get the offsets to the beginnings of each line. */ ++ gsize caret = 0; ++ for (gsize i = 0; i < char_positions_get_size (&contents->characters); i++) { ++ /* Get the attributes for the current cell. */ ++ int offset = *char_positions_index (&contents->characters, i); ++ const struct _VteCharAttributes *attrs = vte_char_attr_list_get (&contents->attrs, offset); ++ ++ /* If this cell is "before" the cursor, move the caret to be "here". */ ++ if ((attrs->row < crow) || ++ ((attrs->row == crow) && (attrs->column < ccol))) { ++ caret = i + 1; ++ } ++ } ++ ++ return caret; ++} ++ ++static void ++vte_accessible_text_contents_snapshot (VteAccessibleTextContents *contents, ++ VteTerminal *terminal) ++{ ++ auto impl = _vte_terminal_get_impl (terminal); ++ GString *gstr = g_string_new (nullptr); ++ ++ try { ++ impl->get_text_displayed_a11y (gstr, &contents->attrs); ++ } catch (...) { ++ g_string_truncate (gstr, 0); ++ } ++ ++ if (vte_char_attr_list_get_size (&contents->attrs) >= G_MAXINT) { ++ g_string_truncate (gstr, 0); ++ return; ++ } ++ ++ /* Get the offsets to the beginnings of each character. */ ++ int i = 0; ++ const char *next = gstr->str; ++ int n_attrs = int(vte_char_attr_list_get_size (&contents->attrs)); ++ while (i < n_attrs) { ++ char_positions_append (&contents->characters, &i); ++ next = g_utf8_next_char (next); ++ if (next != nullptr) { ++ i = next - gstr->str; ++ continue; ++ } ++ break; ++ } ++ ++ /* Find offsets for the beginning of lines. */ ++ gsize n_chars = char_positions_get_size (&contents->characters); ++ int row; ++ for (i = 0, row = 0; i < int(n_chars); i++) { ++ /* Get the attributes for the current cell. */ ++ int offset = *char_positions_index (&contents->characters, i); ++ const struct _VteCharAttributes *attrs = vte_char_attr_list_get (&contents->attrs, offset); ++ ++ /* If this character is on a row different from the row ++ * the character we looked at previously was on, then ++ * it's a new line and we need to keep track of where ++ * it is. */ ++ if ((i == 0) || (attrs->row != row)) { ++ _vte_debug_print (VTE_DEBUG_ALLY, ++ "Row %d/%ld begins at %d.\n", ++ int(char_positions_get_size (&contents->linebreaks)), ++ attrs->row, i); ++ char_positions_append (&contents->linebreaks, &i); ++ } ++ ++ row = attrs->row; ++ } ++ ++ /* Add the final line break. */ ++ char_positions_append (&contents->linebreaks, &i); ++ ++ /* Update the caret position. */ ++ long ccol, crow; ++ vte_terminal_get_cursor_position (terminal, &ccol, &crow); ++ _vte_debug_print (VTE_DEBUG_ALLY, "Cursor at (%ld, " "%ld).\n", ccol, crow); ++ gsize caret = vte_accessible_text_contents_find_caret (contents, ccol, crow); ++ ++ contents->n_bytes = gstr->len; ++ contents->n_chars = n_chars; ++ contents->string = _g_string_free_to_bytes_with_nul (gstr); ++ contents->caret = caret; ++ contents->cached_caret_column = ccol; ++ contents->cached_caret_row = crow; ++ ++ _vte_debug_print (VTE_DEBUG_ALLY, ++ "Refreshed accessibility snapshot, " ++ "%ld cells, %ld characters.\n", ++ long(vte_char_attr_list_get_size(&contents->attrs)), ++ long(char_positions_get_size (&contents->characters))); ++} ++ ++static GBytes * ++vte_accessible_text_contents_slice (VteAccessibleTextContents *contents, ++ guint start, ++ guint end) ++{ ++ static const char empty[] = {0}; ++ guint start_offset; ++ guint end_offset; ++ ++ g_assert (contents != nullptr); ++ ++ if (contents->string == nullptr) ++ return g_bytes_new_static (empty, sizeof empty); ++ ++ if (start > contents->n_chars) ++ start = contents->n_chars; ++ ++ if (end > contents->n_chars) ++ end = contents->n_chars; ++ ++ if (end < start) ++ std::swap (end, start); ++ ++ g_assert (start <= char_positions_get_size (&contents->characters)); ++ g_assert (end <= char_positions_get_size (&contents->characters)); ++ ++ if (start == char_positions_get_size (&contents->characters)) ++ start_offset = g_bytes_get_size (contents->string); ++ else ++ start_offset = *char_positions_index (&contents->characters, start); ++ ++ if (end == char_positions_get_size (&contents->characters)) ++ end_offset = g_bytes_get_size (contents->string); ++ else ++ end_offset = *char_positions_index (&contents->characters, end); ++ ++ g_assert (start_offset <= end_offset); ++ ++ if (start_offset == end_offset) ++ return g_bytes_new_static (empty, sizeof empty); ++ ++ return g_bytes_new_from_bytes (contents->string, start_offset, end_offset - start_offset); ++} ++ ++static void ++vte_accessible_text_free (VteAccessibleText *state) ++{ ++ vte_accessible_text_contents_clear (&state->contents[0]); ++ vte_accessible_text_contents_clear (&state->contents[1]); ++ state->terminal = nullptr; ++ g_free (state); ++} ++ ++static VteAccessibleText * ++vte_accessible_text_get (VteTerminal *terminal) ++{ ++ return (VteAccessibleText *)g_object_get_data (G_OBJECT (terminal), "VTE_ACCESSIBLE_TEXT"); ++} ++ ++static GBytes * ++vte_accessible_text_get_contents (GtkAccessibleText *accessible, ++ guint start, ++ guint end) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ VteAccessibleTextContents *contents = nullptr; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ contents = &state->contents[state->contents_flip]; ++ ++ return vte_accessible_text_contents_slice (contents, start, end); ++} ++ ++static GBytes * ++vte_accessible_text_get_contents_at (GtkAccessibleText *accessible, ++ guint offset, ++ GtkAccessibleTextGranularity granularity, ++ guint *start, ++ guint *end) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ VteAccessibleTextContents *contents; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ auto impl = _vte_terminal_get_impl (terminal); ++ ++ contents = &state->contents[state->contents_flip]; ++ ++ if (contents->string == nullptr) { ++ return nullptr; ++ } ++ ++ if (offset > contents->n_chars) { ++ offset = contents->n_chars; ++ } ++ ++ switch (granularity) { ++ case GTK_ACCESSIBLE_TEXT_GRANULARITY_CHARACTER: { ++ *start = offset; ++ *end = offset + 1; ++ return vte_accessible_text_contents_slice (contents, offset, offset + 1); ++ } ++ ++ case GTK_ACCESSIBLE_TEXT_GRANULARITY_LINE: { ++ guint char_offset = *char_positions_index (&contents->characters, offset); ++ guint line; ++ ++ for (line = 0; ++ line < char_positions_get_size (&contents->linebreaks); ++ line++) { ++ guint line_offset = *char_positions_index (&contents->linebreaks, line); ++ ++ if (line_offset > char_offset) { ++ line--; ++ break; ++ } ++ } ++ ++ _vte_debug_print (VTE_DEBUG_ALLY, ++ "Character %u is on line %u.\n", ++ offset, line); ++ ++ *start = *char_positions_index (&contents->linebreaks, line); ++ if (line + 1 < char_positions_get_size (&contents->linebreaks)) ++ *end = *char_positions_index (&contents->linebreaks, line + 1); ++ else ++ *end = contents->n_chars; ++ ++ return vte_accessible_text_contents_slice (contents, *start, *end); ++ } ++ ++ case GTK_ACCESSIBLE_TEXT_GRANULARITY_WORD: { ++ gunichar ch = vte_accessible_text_contents_get_char_at (contents, offset); ++ ++ if (ch == 0 || !impl->is_word_char (ch)) ++ break; ++ ++ *start = offset; ++ *end = offset; ++ ++ while (*start > 0 && ++ (ch = vte_accessible_text_contents_get_char_at (contents, *start - 1)) && ++ impl->is_word_char (ch)) { ++ (*start)--; ++ } ++ ++ while (*end < contents->n_chars && ++ (ch = vte_accessible_text_contents_get_char_at (contents, *end + 1)) && ++ impl->is_word_char (ch)) { ++ (*end)++; ++ } ++ ++ return vte_accessible_text_contents_slice (contents, *start, *end); ++ } ++ ++ case GTK_ACCESSIBLE_TEXT_GRANULARITY_SENTENCE: ++ case GTK_ACCESSIBLE_TEXT_GRANULARITY_PARAGRAPH: ++ default: ++ break; ++ } ++ ++ return nullptr; ++} ++ ++static guint ++vte_accessible_text_get_caret_position (GtkAccessibleText *accessible) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ ++ g_assert (VTE_IS_TERMINAL (accessible)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ return state->contents[state->contents_flip].caret; ++} ++ ++static gboolean ++vte_accessible_text_get_selection (GtkAccessibleText *accessible, ++ gsize *n_ranges, ++ GtkAccessibleTextRange **ranges) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (ranges != nullptr); ++ ++ *n_ranges = 0; ++ *ranges = nullptr; ++ ++ try { ++ auto impl = _vte_terminal_get_impl (terminal); ++ VteAccessibleTextContents *contents = &state->contents[state->contents_flip]; ++ GtkAccessibleTextRange range; ++ ++ if (impl->m_selection_resolved.empty() || ++ impl->m_selection[vte::to_integral(vte::platform::ClipboardType::PRIMARY)] == nullptr) ++ return FALSE; ++ ++ auto start_column = impl->m_selection_resolved.start_column(); ++ auto start_row = impl->m_selection_resolved.start_row(); ++ auto end_column = impl->m_selection_resolved.end_column(); ++ auto end_row = impl->m_selection_resolved.end_row(); ++ ++ auto start_offset = vte_accessible_text_contents_offset_from_xy (contents, start_column, start_row); ++ auto end_offset = vte_accessible_text_contents_offset_from_xy (contents, end_column, end_row); ++ ++ range.start = gsize(start_offset); ++ range.length = gsize(end_offset - start_offset); ++ ++ *n_ranges = 1; ++ *ranges = (GtkAccessibleTextRange *)g_memdup2 (&range, sizeof range); ++ ++ return TRUE; ++ } catch (...) { } ++ ++ return FALSE; ++} ++ ++static gboolean ++vte_accessible_text_get_attributes (GtkAccessibleText *accessible, ++ guint offset, ++ gsize *n_ranges, ++ GtkAccessibleTextRange **ranges, ++ char ***attribute_names, ++ char ***attribute_values) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ VteAccessibleTextContents *contents; ++ struct _VteCharAttributes cur_attr; ++ struct _VteCharAttributes attr; ++ GtkAccessibleTextRange range; ++ struct { ++ const char *name; ++ const char *value; ++ } attrs[4]; ++ char fg_color[16]; ++ char bg_color[16]; ++ guint n_attrs = 0; ++ guint start = 0; ++ guint end = 0; ++ guint i; ++ ++ g_assert (VTE_IS_TERMINAL (accessible)); ++ g_assert (ranges != nullptr); ++ g_assert (attribute_names != nullptr); ++ g_assert (attribute_values != nullptr); ++ ++ contents = &state->contents[state->contents_flip]; ++ ++ *n_ranges = 0; ++ *ranges = nullptr; ++ *attribute_names = nullptr; ++ *attribute_values = nullptr; ++ ++ attr = *vte_char_attr_list_get (&contents->attrs, offset); ++ start = 0; ++ for (i = offset; i--;) { ++ cur_attr = *vte_char_attr_list_get (&contents->attrs, i); ++ if (!_pango_color_equal (&cur_attr.fore, &attr.fore) || ++ !_pango_color_equal (&cur_attr.back, &attr.back) || ++ cur_attr.underline != attr.underline || ++ cur_attr.strikethrough != attr.strikethrough) { ++ start = i + 1; ++ break; ++ } ++ } ++ end = vte_char_attr_list_get_size (&contents->attrs) - 1; ++ for (i = offset + 1; i < vte_char_attr_list_get_size (&contents->attrs); i++) { ++ cur_attr = *vte_char_attr_list_get (&contents->attrs, i); ++ if (!_pango_color_equal (&cur_attr.fore, &attr.fore) || ++ !_pango_color_equal (&cur_attr.back, &attr.back) || ++ cur_attr.underline != attr.underline || ++ cur_attr.strikethrough != attr.strikethrough) { ++ end = i - 1; ++ break; ++ } ++ } ++ ++ range.start = start; ++ range.length = end - start; ++ ++ if (range.length == 0) ++ return FALSE; ++ ++ if (attr.underline) { ++ attrs[n_attrs].name = "underline"; ++ attrs[n_attrs].value = "true"; ++ n_attrs++; ++ } ++ ++ if (attr.strikethrough) { ++ attrs[n_attrs].name = "strikethrough"; ++ attrs[n_attrs].value = "true"; ++ n_attrs++; ++ } ++ ++ g_snprintf (fg_color, sizeof fg_color, "%u,%u,%u", ++ attr.fore.red, attr.fore.green, attr.fore.blue); ++ attrs[n_attrs].name = "fg-color"; ++ attrs[n_attrs].value = fg_color; ++ n_attrs++; ++ ++ g_snprintf (bg_color, sizeof bg_color, "%u,%u,%u", ++ attr.back.red, attr.back.green, attr.back.blue); ++ attrs[n_attrs].name = "bg-color"; ++ attrs[n_attrs].value = bg_color; ++ n_attrs++; ++ ++ *attribute_names = g_new0 (char *, n_attrs + 1); ++ *attribute_values = g_new0 (char *, n_attrs + 1); ++ *n_ranges = 1; ++ *ranges = (GtkAccessibleTextRange *)g_memdup2 (&range, sizeof range); ++ ++ for (i = 0; i < n_attrs; i++) { ++ (*attribute_names)[i] = g_strdup (attrs[i].name); ++ (*attribute_values)[i] = g_strdup (attrs[i].value); ++ } ++ ++ return TRUE; ++} ++ ++void ++_vte_accessible_text_iface_init (GtkAccessibleTextInterface *iface) ++{ ++ iface->get_attributes = vte_accessible_text_get_attributes; ++ iface->get_caret_position = vte_accessible_text_get_caret_position; ++ iface->get_contents = vte_accessible_text_get_contents; ++ iface->get_contents_at = vte_accessible_text_get_contents_at; ++ iface->get_selection = vte_accessible_text_get_selection; ++} ++ ++static void ++vte_accessible_text_contents_changed (VteTerminal *terminal, ++ VteAccessibleText *state) ++{ ++ VteAccessibleTextContents *next = nullptr; ++ VteAccessibleTextContents *prev = nullptr; ++ const char *nextstr; ++ const char *prevstr; ++ gsize prevlen; ++ gsize nextlen; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ ++ prev = &state->contents[state->contents_flip]; ++ next = &state->contents[!state->contents_flip]; ++ ++ /* Get a new snapshot of contents so that we can compare this to the ++ * previous contents. That way we can discover if it was a backspace ++ * that occurred or if it's more than that. ++ * ++ * We do not filp state->contents_flip immediately so that we can ++ * allow the AT context the ability to access the current contents ++ * on DELETE operations. ++ */ ++ vte_accessible_text_contents_reset (next); ++ vte_accessible_text_contents_snapshot (next, state->terminal); ++ ++ nextstr = vte_accessible_text_contents_get_string (next, &nextlen); ++ prevstr = vte_accessible_text_contents_get_string (prev, &prevlen); ++ ++ vte_assert_cmpint (char_positions_get_size (&prev->characters), ==, prev->n_chars); ++ vte_assert_cmpint (char_positions_get_size (&next->characters), ==, next->n_chars); ++ ++ /* NOTE: ++ * ++ * The code below is based upon what vteaccess.cc did for GTK 3. ++ * It does not do any sort of appropriate diffing to try to handle ++ * scrolling correctly. That would be a good idea to implement in ++ * the longer term. ++ * ++ * It just looks for a long prefix match, and then a long suffix ++ * match and attempts to diff what is between those to end points. ++ */ ++ ++ const char *prevc = prevstr; ++ const char *nextc = nextstr; ++ gsize offset = 0; ++ ++ /* Find the beginning of changes */ ++ while ((offset < prev->n_chars) && (offset < next->n_chars)) { ++ gunichar prevch = g_utf8_get_char (prevc); ++ gunichar nextch = g_utf8_get_char (nextc); ++ ++ if (prevch != nextch) { ++ break; ++ } ++ ++ offset++; ++ ++ prevc = g_utf8_next_char (prevc); ++ nextc = g_utf8_next_char (nextc); ++ } ++ ++ /* Find the end of changes */ ++ gsize next_end = next->n_chars; ++ gsize prev_end = prev->n_chars; ++ ++ prevc = prevstr + prevlen; ++ nextc = nextstr + nextlen; ++ ++ while ((next_end > offset) && (prev_end > offset)) { ++ prevc = g_utf8_prev_char (prevc); ++ nextc = g_utf8_prev_char (nextc); ++ ++ gunichar prevch = g_utf8_get_char (prevc); ++ gunichar nextch = g_utf8_get_char (nextc); ++ ++ if (prevch != nextch) { ++ break; ++ } ++ ++ next_end--; ++ prev_end--; ++ } ++ ++ if (offset < prev_end) { ++ gtk_accessible_text_update_contents (GTK_ACCESSIBLE_TEXT (terminal), ++ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE, ++ offset, prev_end); ++ } ++ ++ state->contents_flip = !state->contents_flip; ++ ++ if (offset < next_end) { ++ gtk_accessible_text_update_contents (GTK_ACCESSIBLE_TEXT (terminal), ++ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT, ++ offset, next_end); ++ } ++ ++ if (prev->caret != next->caret) { ++ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); ++ } ++} ++ ++static void ++vte_accessible_text_cursor_moved (VteTerminal *terminal, ++ VteAccessibleText *state) ++{ ++ VteAccessibleTextContents *contents = nullptr; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ ++ contents = &state->contents[state->contents_flip]; ++ ++ long ccol, crow; ++ vte_terminal_get_cursor_position (terminal, &ccol, &crow); ++ if (ccol == contents->cached_caret_column && crow == contents->cached_caret_row) { ++ return; ++ } ++ ++ _vte_debug_print (VTE_DEBUG_ALLY, "Cursor at (%ld, " "%ld).\n", ccol, crow); ++ ++ contents->cached_caret_column = ccol; ++ contents->cached_caret_row = crow; ++ contents->caret = vte_accessible_text_contents_find_caret (contents, ccol, crow); ++ ++ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); ++} ++ ++static void ++vte_accessible_text_window_title_changed (VteTerminal *terminal, ++ VteAccessibleText *state) ++{ ++ const char *window_title; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ ++ window_title = vte_terminal_get_window_title (terminal); ++ ++ gtk_accessible_update_property (GTK_ACCESSIBLE (terminal), ++ GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, window_title ? window_title : "", ++ GTK_ACCESSIBLE_VALUE_UNDEFINED); ++} ++ ++static void ++vte_accessible_text_selection_changed (VteTerminal *terminal, ++ VteAccessibleText *state) ++{ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ ++ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); ++ gtk_accessible_text_update_selection_bound (GTK_ACCESSIBLE_TEXT (terminal)); ++} ++ ++void ++_vte_accessible_text_init (GtkAccessibleText *accessible) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state; ++ ++ state = g_new0 (VteAccessibleText, 1); ++ state->terminal = terminal; ++ ++ vte_accessible_text_contents_init (&state->contents[0]); ++ vte_accessible_text_contents_init (&state->contents[1]); ++ ++ g_object_set_data_full (G_OBJECT (terminal), ++ "VTE_ACCESSIBLE_TEXT", ++ state, ++ (GDestroyNotify)vte_accessible_text_free); ++ ++ g_signal_connect (terminal, ++ "contents-changed", ++ G_CALLBACK (vte_accessible_text_contents_changed), ++ state); ++ g_signal_connect (terminal, ++ "cursor-moved", ++ G_CALLBACK (vte_accessible_text_cursor_moved), ++ state); ++ g_signal_connect (terminal, ++ "selection-changed", ++ G_CALLBACK (vte_accessible_text_selection_changed), ++ state); ++ g_signal_connect (terminal, ++ "window-title-changed", ++ G_CALLBACK (vte_accessible_text_window_title_changed), ++ state); ++ ++ const char *window_title = vte_terminal_get_window_title (terminal); ++ ++ gtk_accessible_update_property (GTK_ACCESSIBLE (accessible), ++ GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, window_title ? window_title : "", ++ GTK_ACCESSIBLE_PROPERTY_HAS_POPUP, TRUE, ++ GTK_ACCESSIBLE_PROPERTY_LABEL, "Terminal", ++ GTK_ACCESSIBLE_PROPERTY_MULTI_LINE, TRUE, ++ GTK_ACCESSIBLE_VALUE_UNDEFINED); ++} +diff --git a/src/vteaccess-gtk4.h b/src/vteaccess-gtk4.h +new file mode 100644 +index 00000000..37b09c7b +--- /dev/null ++++ b/src/vteaccess-gtk4.h +@@ -0,0 +1,25 @@ ++/* ++ * Copyright © 2024 Christian Hergert ++ * ++ * This library is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as published ++ * by the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public License ++ * along with this library. If not, see . ++ */ ++ ++#include ++ ++G_BEGIN_DECLS ++ ++void _vte_accessible_text_iface_init (GtkAccessibleTextInterface *iface); ++void _vte_accessible_text_init (GtkAccessibleText *accessible); ++ ++G_END_DECLS +diff --git a/src/vteaccess.cc b/src/vteaccess.cc +index fff918dc..c1c1a4c0 100644 +--- a/src/vteaccess.cc ++++ b/src/vteaccess.cc +@@ -386,6 +386,12 @@ _vte_terminal_accessible_text_modified(VteTerminalAccessible* accessible) + glong offset, caret_offset, olen, clen; + gint old_snapshot_caret; + ++ auto widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(accessible)); ++ auto terminal = VTE_TERMINAL(widget); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ + old_snapshot_caret = priv->snapshot_caret; + priv->snapshot_contents_invalid = TRUE; + vte_terminal_accessible_update_private_data_if_needed(accessible, +@@ -541,6 +547,9 @@ _vte_terminal_accessible_text_scrolled(VteTerminalAccessible* accessible, + auto widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(accessible)); + auto terminal = VTE_TERMINAL(widget); + ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ + row_count = vte_terminal_get_row_count(terminal); + if (((howmuch < 0) && (howmuch <= -row_count)) || + ((howmuch > 0) && (howmuch >= row_count))) { +@@ -793,6 +802,9 @@ vte_terminal_accessible_invalidate_cursor(VteTerminal *terminal, gpointer data) + VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; + VteTerminalAccessiblePrivate *priv = (VteTerminalAccessiblePrivate *)_vte_terminal_accessible_get_instance_private(accessible); + ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ + _vte_debug_print(VTE_DEBUG_ALLY, + "Invalidating accessibility cursor.\n"); + priv->snapshot_caret_invalid = TRUE; +@@ -807,6 +819,9 @@ vte_terminal_accessible_title_changed(VteTerminal *terminal, gpointer data) + { + VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; + ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ + atk_object_set_description(ATK_OBJECT(accessible), vte_terminal_get_window_title(terminal)); + } + +@@ -820,6 +835,9 @@ vte_terminal_accessible_visibility_notify(VteTerminal *terminal, + GtkWidget *widget; + gboolean visible; + ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return FALSE; ++ + visible = event->state != GDK_VISIBILITY_FULLY_OBSCURED; + /* The VISIBLE state indicates that this widget is "visible". */ + atk_object_notify_state_change(ATK_OBJECT(accessible), +@@ -851,6 +869,9 @@ vte_terminal_accessible_selection_changed (VteTerminal *terminal, + { + VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; + ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ + g_signal_emit_by_name (accessible, "text_selection_changed"); + } + +diff --git a/src/vtegtk.cc b/src/vtegtk.cc +index 92eb6881..082f3b95 100644 +--- a/src/vtegtk.cc ++++ b/src/vtegtk.cc +@@ -65,9 +65,11 @@ + #include + + #if WITH_A11Y +-#if VTE_GTK == 3 +-#include "vteaccess.h" +-#endif /* VTE_GTK == 3 */ ++# if VTE_GTK == 3 ++# include "vteaccess.h" ++# elif VTE_GTK == 4 ++# include "vteaccess-gtk4.h" ++# endif + #endif /* WITH_A11Y */ + + #if WITH_ICU +@@ -155,6 +157,14 @@ private: + std::shared_ptr m_widget; + }; + ++#if defined(WITH_A11Y) && VTE_GTK == 4 ++# define VTE_IMPLEMENT_ACCESSIBLE \ ++ G_IMPLEMENT_INTERFACE(GTK_TYPE_ACCESSIBLE_TEXT, \ ++ _vte_accessible_text_iface_init) ++#else ++# define VTE_IMPLEMENT_ACCESSIBLE ++#endif ++ + #if VTE_DEBUG + G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, + { +@@ -163,6 +173,7 @@ G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, + } + g_type_add_class_private (g_define_type_id, sizeof (VteTerminalClassPrivate)); + G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr) ++ VTE_IMPLEMENT_ACCESSIBLE + if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) { + g_printerr("vte_terminal_get_type()\n"); + }) +@@ -173,7 +184,8 @@ G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, + g_type_add_instance_private(g_define_type_id, sizeof(VteTerminalPrivate)); + } + g_type_add_class_private (g_define_type_id, sizeof (VteTerminalClassPrivate)); +- G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr)) ++ G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr) ++ VTE_IMPLEMENT_ACCESSIBLE) + #endif + + static inline auto +@@ -901,6 +913,10 @@ try + gtk_widget_set_has_window(&terminal->widget, FALSE); + #endif + ++#if defined(WITH_A11Y) && VTE_GTK == 4 ++ _vte_accessible_text_init (GTK_ACCESSIBLE_TEXT (terminal)); ++#endif ++ + place = vte_terminal_get_instance_private(terminal); + new (place) VteTerminalPrivate{terminal}; + } +@@ -1011,6 +1027,9 @@ try + case PROP_DELETE_BINDING: + g_value_set_enum (value, widget->delete_binding()); + break; ++ case PROP_ENABLE_A11Y: ++ g_value_set_boolean (value, vte_terminal_get_enable_a11y (terminal)); ++ break; + case PROP_ENABLE_BIDI: + g_value_set_boolean (value, vte_terminal_get_enable_bidi (terminal)); + break; +@@ -1166,6 +1185,9 @@ try + case PROP_DELETE_BINDING: + vte_terminal_set_delete_binding (terminal, (VteEraseBinding)g_value_get_enum (value)); + break; ++ case PROP_ENABLE_A11Y: ++ vte_terminal_set_enable_a11y (terminal, g_value_get_boolean (value)); ++ break; + case PROP_ENABLE_BIDI: + vte_terminal_set_enable_bidi (terminal, g_value_get_boolean (value)); + break; +@@ -2226,6 +2248,22 @@ vte_terminal_class_init(VteTerminalClass *klass) + VTE_ERASE_AUTO, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); + ++ /** ++ * VteTerminal:enable-a11y: ++ * ++ * Controls whether or not a11y is enabled for the widget. ++ * ++ * Since: 0.78 ++ */ ++ pspecs[PROP_ENABLE_A11Y] = ++ g_param_spec_boolean ("enable-a11y", NULL, NULL, ++#if VTE_GTK == 3 ++ TRUE, ++#else ++ FALSE, ++#endif ++ (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); ++ + /** + * VteTerminal:enable-bidi: + * +@@ -2631,10 +2669,12 @@ vte_terminal_class_init(VteTerminalClass *klass) + err.assert_no_error(); + #endif + +-#if VTE_GTK == 3 + #if WITH_A11Y ++#if VTE_GTK == 3 + /* a11y */ + gtk_widget_class_set_accessible_type(widget_class, VTE_TYPE_TERMINAL_ACCESSIBLE); ++#elif VTE_GTK == 4 ++ gtk_widget_class_set_accessible_role(widget_class, GTK_ACCESSIBLE_ROLE_TERMINAL); + #endif + #endif + } +@@ -5578,6 +5618,53 @@ catch (...) + vte::log_exception(); + } + ++/** ++ * vte_terminal_get_enable_a11y: ++ * @terminal: a #VteTerminal ++ * ++ * Checks whether the terminal communicates with a11y backends ++ * ++ * Returns: %TRUE if a11y is enabled, %FALSE if not ++ * ++ * Since: 0.78 ++ */ ++gboolean ++vte_terminal_get_enable_a11y(VteTerminal *terminal) noexcept ++try ++{ ++ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), false); ++ return IMPL(terminal)->m_enable_a11y; ++} ++catch (...) ++{ ++ vte::log_exception(); ++ return false; ++} ++ ++/** ++ * vte_terminal_set_enable_a11y: ++ * @terminal: a #VteTerminal ++ * @enable_a11y: %TRUE to enable a11y support ++ * ++ * Controls whether or not the terminal will communicate with a11y backends. ++ * ++ * Since: 0.78 ++ */ ++void ++vte_terminal_set_enable_a11y(VteTerminal *terminal, ++ gboolean enable_a11y) noexcept ++try ++{ ++ g_return_if_fail(VTE_IS_TERMINAL(terminal)); ++ ++ if (IMPL(terminal)->set_enable_a11y(enable_a11y != FALSE)) ++ g_object_notify_by_pspec(G_OBJECT(terminal), pspecs[PROP_ENABLE_A11Y]); ++} ++catch (...) ++{ ++ vte::log_exception(); ++} ++ + /** + * vte_terminal_get_enable_bidi: + * @terminal: a #VteTerminal +diff --git a/src/vtegtk.hh b/src/vtegtk.hh +index 1d1383af..a73957a0 100644 +--- a/src/vtegtk.hh ++++ b/src/vtegtk.hh +@@ -75,6 +75,7 @@ enum { + PROP_CURRENT_DIRECTORY_URI, + PROP_CURRENT_FILE_URI, + PROP_DELETE_BINDING, ++ PROP_ENABLE_A11Y, + PROP_ENABLE_BIDI, + PROP_ENABLE_FALLBACK_SCROLLING, + PROP_ENABLE_SHAPING, +diff --git a/src/vteinternal.hh b/src/vteinternal.hh +index ed57ad16..4f8ade65 100644 +--- a/src/vteinternal.hh ++++ b/src/vteinternal.hh +@@ -776,6 +776,13 @@ public: + const char *m_hyperlink_hover_uri; /* data is owned by the ring */ + long m_hyperlink_auto_id{0}; + ++ /* Accessibility support */ ++#if VTE_GTK == 3 ++ bool m_enable_a11y{true}; ++#elif VTE_GTK == 4 ++ bool m_enable_a11y{false}; ++#endif ++ + /* RingView and friends */ + vte::base::RingView m_ringview; + bool m_enable_bidi{true}; +@@ -1505,6 +1512,7 @@ public: + bool set_cursor_style(CursorStyle style); + bool set_delete_binding(EraseMode binding); + auto delete_binding() const noexcept { return m_delete_binding; } ++ bool set_enable_a11y(bool setting); + bool set_enable_bidi(bool setting); + bool set_enable_shaping(bool setting); + bool set_encoding(char const* codeset, +-- +2.44.0 + + +From 64ea71aef8878971fbca1c5f97b38be77a848eeb Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 -Subject: [PATCH 01/11] Add sequences and signals for desktop notification +Subject: [PATCH 02/12] Add sequences and signals for desktop notification Add sequences OSC 777 ; notify ; SUMMARY ; BODY BEL @@ -36,10 +1361,10 @@ index 241128c3..4412cf3d 100644 VOID:STRING,UINT VOID:UINT,UINT diff --git a/src/vte.cc b/src/vte.cc -index 92b19fc8..03868606 100644 +index 6f5ed505..dd24a147 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10191,6 +10191,16 @@ Terminal::emit_pending_signals() +@@ -10784,6 +10784,16 @@ Terminal::emit_pending_signals() emit_adjustment_changed(); @@ -57,10 +1382,10 @@ index 92b19fc8..03868606 100644 if (m_window_title != m_window_title_pending) { m_window_title.swap(m_window_title_pending); diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 69b26ac3..13caec60 100644 +index 33360909..36a32881 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -109,9 +109,11 @@ struct _VteTerminalClass { +@@ -114,9 +114,11 @@ struct _VteTerminalClass { void (*bell)(VteTerminal* terminal); #if _VTE_GTK == 3 @@ -72,12 +1397,12 @@ index 69b26ac3..13caec60 100644 + gpointer _extra_padding[2]; #endif /* _VTE_GTK == 3 */ - /* Add new vfuncs here, and subtract from the padding below. */ + void (*setup_context_menu)(VteTerminal* terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 59b74367..e9af14d1 100644 +index 082f3b95..e253a379 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1263,6 +1263,9 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1373,6 +1373,9 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->child_exited = NULL; klass->encoding_changed = NULL; klass->char_size_changed = NULL; @@ -87,7 +1412,7 @@ index 59b74367..e9af14d1 100644 klass->window_title_changed = NULL; klass->icon_title_changed = NULL; klass->selection_changed = NULL; -@@ -1346,6 +1349,28 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1456,6 +1459,28 @@ vte_terminal_class_init(VteTerminalClass *klass) G_OBJECT_CLASS_TYPE(klass), g_cclosure_marshal_VOID__INTv); @@ -117,13 +1442,13 @@ index 59b74367..e9af14d1 100644 * VteTerminal::window-title-changed: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 6b7a1ea2..d5379b16 100644 +index a73957a0..bd49ed9b 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -52,6 +52,9 @@ enum { - SIGNAL_RESIZE_WINDOW, +@@ -53,6 +53,9 @@ enum { SIGNAL_RESTORE_WINDOW, SIGNAL_SELECTION_CHANGED, + SIGNAL_SETUP_CONTEXT_MENU, +#if _VTE_GTK == 3 + SIGNAL_NOTIFICATION_RECEIVED, +#endif @@ -131,10 +1456,10 @@ index 6b7a1ea2..d5379b16 100644 LAST_SIGNAL }; diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 0d454649..8dba726c 100644 +index 4f8ade65..d7c82654 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -662,6 +662,12 @@ public: +@@ -710,6 +710,12 @@ public: gboolean m_cursor_moved_pending; gboolean m_contents_changed_pending; @@ -147,7 +1472,7 @@ index 0d454649..8dba726c 100644 std::string m_window_title{}; std::string m_current_directory_uri{}; std::string m_current_file_uri{}; -@@ -675,6 +681,9 @@ public: +@@ -723,6 +729,9 @@ public: TITLE = 1u << 0, CWD = 1u << 1, CWF = 1u << 2, @@ -157,7 +1482,7 @@ index 0d454649..8dba726c 100644 }; unsigned m_pending_changes{0}; -@@ -1506,6 +1515,11 @@ public: +@@ -1662,6 +1671,11 @@ public: int osc) noexcept; /* OSC handlers */ @@ -170,10 +1495,10 @@ index 0d454649..8dba726c 100644 vte::parser::StringTokeniser::const_iterator& token, vte::parser::StringTokeniser::const_iterator const& endtoken, diff --git a/src/vteseq.cc b/src/vteseq.cc -index 874d2405..dda487c4 100644 +index 904837e1..7702c477 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1376,6 +1376,35 @@ Terminal::delete_lines(vte::grid::row_t param) +@@ -1276,6 +1276,35 @@ Terminal::erase_in_line(vte::parser::Sequence const& seq) m_text_deleted_flag = TRUE; } @@ -209,7 +1534,7 @@ index 874d2405..dda487c4 100644 bool Terminal::get_osc_color_index(int osc, int value, -@@ -6541,6 +6570,12 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6596,6 +6625,12 @@ Terminal::OSC(vte::parser::Sequence const& seq) reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE); break; @@ -222,7 +1547,7 @@ index 874d2405..dda487c4 100644 case VTE_OSC_XTERM_SET_ICON_TITLE: case VTE_OSC_XTERM_SET_XPROPERTY: case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG: -@@ -6582,7 +6617,9 @@ Terminal::OSC(vte::parser::Sequence const& seq) +@@ -6636,7 +6671,9 @@ Terminal::OSC(vte::parser::Sequence const& seq) case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC: case VTE_OSC_URXVT_VIEW_UP: case VTE_OSC_URXVT_VIEW_DOWN: @@ -233,13 +1558,13 @@ index 874d2405..dda487c4 100644 default: break; -- -2.40.0 +2.44.0 -From 74a4ad9c4472c9c628945c336ca1bfb535b105d6 Mon Sep 17 00:00:00 2001 +From d129d56171c4059a8622a63e7a27ee9306590377 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 29 Jan 2015 13:09:17 +0100 -Subject: [PATCH 02/11] vte.sh: Emit OSC 777 from PROMPT_COMMAND +Subject: [PATCH 03/12] vte.sh: Emit OSC 777 from PROMPT_COMMAND For some reason, the three consecutive backslashes break the parsing. As Christian Persch suggested, replacing the double quotes with @@ -251,41 +1576,41 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711059 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vte.sh.in b/src/vte.sh.in -index 242d6c42..50242223 100644 +index 2328a9ec..157bd29c 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in @@ -33,10 +33,12 @@ __vte_osc7 () { } __vte_prompt_command() { -+ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//') -+ command="${command//;/ }" - local pwd='~' - [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} - pwd="${pwd//[[:cntrl:]]}" -- printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${pwd}" -+ printf '\033]777;notify;Command completed;%s\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" - __vte_osc7 ++ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//') ++ command="${command//;/ }" + local pwd='~' + [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} + pwd="${pwd//[[:cntrl:]]}" +- printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${pwd}" ++ printf '\033]777;notify;Command completed;%s\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" + __vte_osc7 } -- -2.40.0 +2.44.0 -From e67e4455cc51f9d272abd17770ae3cd395932695 Mon Sep 17 00:00:00 2001 +From da46de7cb882f7682d3605f374730ddccd9dfa0d Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 22 Jan 2015 16:37:10 +0100 -Subject: [PATCH 03/11] Test the notification-received signal +Subject: [PATCH 04/12] Test the notification-received signal --- - src/app/app.cc | 12 +++++++++++- - 1 file changed, 11 insertions(+), 1 deletion(-) + src/app/app.cc | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/app/app.cc b/src/app/app.cc -index a69d9327..29e0e953 100644 +index e4e7b978..875022e9 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2286,6 +2286,14 @@ window_window_title_changed_cb(VteTerminal* terminal, +@@ -2943,6 +2943,14 @@ window_window_title_changed_cb(VteTerminal* terminal, gtk_window_set_title(GTK_WINDOW(window), title && title[0] ? title : "Terminal"); } @@ -300,7 +1625,7 @@ index a69d9327..29e0e953 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2582,8 +2590,10 @@ vteapp_window_constructed(GObject *object) +@@ -3234,8 +3242,9 @@ vteapp_window_constructed(GObject *object) if (options.object_notifications) g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); @@ -308,18 +1633,17 @@ index a69d9327..29e0e953 100644 #if VTE_GTK == 3 + g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); + -+ /* Settings */ - if (options.no_double_buffer) { + if (!options.double_buffer) { G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_widget_set_double_buffered(GTK_WIDGET(window->terminal), false); -- -2.40.0 +2.44.0 -From 2514b0691278b74cab734cf29a47c7a86b138f5d Mon Sep 17 00:00:00 2001 +From 6a61519759cc00a7e8e2469eb4bebcfe39307215 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:53:54 +0200 -Subject: [PATCH 04/11] Add a property to configure the scroll speed +Subject: [PATCH 05/12] Add a property to configure the scroll speed By default, it is set to zero which gives the current behaviour of moving the buffer by a function of the number of visible rows. @@ -334,10 +1658,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1103380 5 files changed, 99 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index 03868606..1c9abbab 100644 +index dd24a147..24deaead 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -9391,6 +9391,9 @@ vte_cairo_get_clip_region(cairo_t *cr) +@@ -10033,6 +10033,9 @@ vte_cairo_get_clip_region(cairo_t *cr) bool Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) { @@ -347,7 +1671,7 @@ index 03868606..1c9abbab 100644 gdouble v; gint cnt, i; int button; -@@ -9425,7 +9428,17 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) +@@ -10068,7 +10071,17 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) return true; } @@ -365,7 +1689,7 @@ index 03868606..1c9abbab 100644 _vte_debug_print(VTE_DEBUG_EVENTS, "Scroll speed is %d lines per non-smooth scroll unit\n", (int) v); -@@ -9735,6 +9748,18 @@ Terminal::decscusr_cursor_shape() const noexcept +@@ -10399,6 +10412,18 @@ Terminal::decscusr_cursor_shape() const noexcept } } @@ -385,10 +1709,10 @@ index 03868606..1c9abbab 100644 Terminal::set_scrollback_lines(long lines) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 13caec60..5985dda2 100644 +index 36a32881..ec56a0ce 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -330,6 +330,12 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, +@@ -343,6 +343,12 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, _VTE_PUBLIC VteCursorShape vte_terminal_get_cursor_shape(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); @@ -402,10 +1726,10 @@ index 13caec60..5985dda2 100644 _VTE_PUBLIC void vte_terminal_set_scrollback_lines(VteTerminal *terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index e9af14d1..835470f7 100644 +index e253a379..a22a7049 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1014,6 +1014,11 @@ try +@@ -1072,6 +1072,11 @@ try case PROP_REWRAP_ON_RESIZE: g_value_set_boolean (value, vte_terminal_get_rewrap_on_resize (terminal)); break; @@ -417,7 +1741,7 @@ index e9af14d1..835470f7 100644 case PROP_SCROLLBACK_LINES: g_value_set_uint (value, vte_terminal_get_scrollback_lines(terminal)); break; -@@ -1135,6 +1140,11 @@ try +@@ -1225,6 +1230,11 @@ try case PROP_REWRAP_ON_RESIZE: vte_terminal_set_rewrap_on_resize (terminal, g_value_get_boolean (value)); break; @@ -429,7 +1753,7 @@ index e9af14d1..835470f7 100644 case PROP_SCROLLBACK_LINES: vte_terminal_set_scrollback_lines (terminal, g_value_get_uint (value)); break; -@@ -2235,6 +2245,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2444,6 +2454,23 @@ vte_terminal_class_init(VteTerminalClass *klass) TRUE, (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -453,7 +1777,7 @@ index e9af14d1..835470f7 100644 /** * VteTerminal:scrollback-lines: * -@@ -6060,6 +6087,38 @@ catch (...) +@@ -6503,6 +6530,38 @@ catch (...) return -1; } @@ -493,10 +1817,10 @@ index e9af14d1..835470f7 100644 * vte_terminal_set_scrollback_lines: * @terminal: a #VteTerminal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index d5379b16..3f1ae86d 100644 +index bd49ed9b..125c109d 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -88,6 +88,9 @@ enum { +@@ -93,6 +93,9 @@ enum { PROP_MOUSE_POINTER_AUTOHIDE, PROP_PTY, PROP_REWRAP_ON_RESIZE, @@ -504,14 +1828,14 @@ index d5379b16..3f1ae86d 100644 + PROP_SCROLL_SPEED, +#endif PROP_SCROLLBACK_LINES, + PROP_SCROLL_ON_INSERT, PROP_SCROLL_ON_KEYSTROKE, - PROP_SCROLL_ON_OUTPUT, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 8dba726c..4629c95f 100644 +index d7c82654..53737f65 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -428,6 +428,9 @@ public: - bool m_fallback_scrolling{true}; +@@ -471,6 +471,9 @@ public: + bool m_scroll_on_insert{false}; bool m_scroll_on_output{false}; bool m_scroll_on_keystroke{true}; +#if _VTE_GTK == 3 @@ -520,7 +1844,7 @@ index 8dba726c..4629c95f 100644 vte::grid::row_t m_scrollback_lines{0}; inline auto scroll_limit_lower() const noexcept -@@ -1385,6 +1388,9 @@ public: +@@ -1534,6 +1537,9 @@ public: bool set_input_enabled(bool enabled); bool set_mouse_autohide(bool autohide); bool set_rewrap_on_resize(bool rewrap); @@ -531,24 +1855,24 @@ index 8dba726c..4629c95f 100644 bool set_fallback_scrolling(bool set); auto fallback_scrolling() const noexcept { return m_fallback_scrolling; } -- -2.40.0 +2.44.0 -From 431763fb3dc23ffc0144c8739d9b898bf7a436f4 Mon Sep 17 00:00:00 2001 +From a3a76d2dcd4f48dbe4c19c653dbd647d2c9d4e4d Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 13 May 2016 17:54:57 +0200 -Subject: [PATCH 05/11] Test the scroll-speed property +Subject: [PATCH 06/12] Test the scroll-speed property https://bugzilla.redhat.com/show_bug.cgi?id=1103380 --- - src/app/app.cc | 10 ++++++++++ - 1 file changed, 10 insertions(+) + src/app/app.cc | 12 ++++++++++++ + 1 file changed, 12 insertions(+) diff --git a/src/app/app.cc b/src/app/app.cc -index 29e0e953..a3cc9257 100644 +index 875022e9..f1b96a33 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -118,6 +118,9 @@ public: +@@ -135,6 +135,9 @@ public: int verbosity{0}; double cell_height_scale{1.0}; double cell_width_scale{1.0}; @@ -558,21 +1882,23 @@ index 29e0e953..a3cc9257 100644 VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM}; VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK}; VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS}; -@@ -700,6 +703,10 @@ public: - "Reverse foreground/background colors", nullptr }, - { "require-systemd-scope", 0, 0, G_OPTION_ARG_NONE, &require_systemd_scope, - "Require use of a systemd user scope", nullptr }, +@@ -1309,6 +1312,12 @@ public: + "Enable the setting of the icon title", nullptr }, + { "output-file", 0, 0, G_OPTION_ARG_FILENAME, &output_filename, + "Save terminal contents to file at exit", nullptr }, +#if _VTE_GTK == 3 + { "scroll-speed", 0, 0, G_OPTION_ARG_INT, &scroll_speed, + "Specify the scroll speed", nullptr }, +#endif - { "scroll-unit-is-pixels", 0, 0, G_OPTION_ARG_NONE, &scroll_unit_is_pixels, - "Use pixels as scroll unit", nullptr }, ++ { "scroll-unit-is-pixels", 0, 0, G_OPTION_ARG_NONE, &scroll_unit_is_pixels, ++ "Use pixels as scroll unit", nullptr }, { "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines, -@@ -2626,6 +2633,9 @@ vteapp_window_constructed(GObject *object) - vte_terminal_set_rewrap_on_resize(window->terminal, !options.no_rewrap); - vte_terminal_set_scroll_on_output(window->terminal, false); - vte_terminal_set_scroll_on_keystroke(window->terminal, true); + "Specify the number of scrollback-lines (-1 for infinite)", nullptr }, + { "title", 0, 0, G_OPTION_ARG_STRING, &title, "Set the initial title of the window", "TITLE" }, +@@ -3279,6 +3288,9 @@ vteapp_window_constructed(GObject *object) + vte_terminal_set_scroll_on_insert(window->terminal, options.scroll_on_insert); + vte_terminal_set_scroll_on_output(window->terminal, options.scroll_on_output); + vte_terminal_set_scroll_on_keystroke(window->terminal, options.scroll_on_keystroke); +#if _VTE_GTK == 3 + vte_terminal_set_scroll_speed(window->terminal, options.scroll_speed); +#endif @@ -580,13 +1906,13 @@ index 29e0e953..a3cc9257 100644 vte_terminal_set_scrollback_lines(window->terminal, options.scrollback_lines); vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); -- -2.40.0 +2.44.0 -From e20d22a23be7383f8114dc59598be6c8a9bb73a0 Mon Sep 17 00:00:00 2001 +From 43dae28d61af42ccaa92854eaa64d5ba7d6d466d Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 7 Jan 2015 16:01:00 +0100 -Subject: [PATCH 06/11] Support preexec notifications from an interactive shell +Subject: [PATCH 07/12] Support preexec notifications from an interactive shell Add sequences OSC 777 ; preexec BEL @@ -612,10 +1938,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 1c9abbab..32d3315a 100644 +index 24deaead..e9e51434 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10224,6 +10224,12 @@ Terminal::emit_pending_signals() +@@ -10817,6 +10817,12 @@ Terminal::emit_pending_signals() m_notification_summary.c_str(), m_notification_body.c_str()); } @@ -629,7 +1955,7 @@ index 1c9abbab..32d3315a 100644 if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { diff --git a/src/vte.sh.in b/src/vte.sh.in -index 50242223..01b44e23 100644 +index 157bd29c..ffc0942a 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in @@ -51,9 +51,9 @@ if [[ -n "${BASH_VERSION:-}" ]]; then @@ -643,12 +1969,12 @@ index 50242223..01b44e23 100644 + PROMPT_COMMAND="__vte_prompt_command" && PS0=$(printf "\033]777;preexec\033\\") fi - elif [[ -n "${ZSH_VERSION:-}" ]]; then + # Shell integration diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 5985dda2..d6721a52 100644 +index ec56a0ce..efd8732b 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -110,10 +110,11 @@ struct _VteTerminalClass { +@@ -115,10 +115,11 @@ struct _VteTerminalClass { #if _VTE_GTK == 3 void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); @@ -660,12 +1986,12 @@ index 5985dda2..d6721a52 100644 + gpointer _extra_padding[1]; #endif /* _VTE_GTK == 3 */ - /* Add new vfuncs here, and subtract from the padding below. */ + void (*setup_context_menu)(VteTerminal* terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 835470f7..8dd7ea50 100644 +index a22a7049..f8d971c1 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1275,6 +1275,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1385,6 +1385,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->char_size_changed = NULL; #if _VTE_GTK == 3 klass->notification_received = NULL; @@ -673,7 +1999,7 @@ index 835470f7..8dd7ea50 100644 #endif klass->window_title_changed = NULL; klass->icon_title_changed = NULL; -@@ -1379,6 +1380,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1489,6 +1490,23 @@ vte_terminal_class_init(VteTerminalClass *klass) _vte_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -698,22 +2024,22 @@ index 835470f7..8dd7ea50 100644 /** diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 3f1ae86d..0c86fb6e 100644 +index 125c109d..6252a2c8 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -53,6 +53,7 @@ enum { - SIGNAL_RESTORE_WINDOW, +@@ -54,6 +54,7 @@ enum { SIGNAL_SELECTION_CHANGED, + SIGNAL_SETUP_CONTEXT_MENU, #if _VTE_GTK == 3 + SIGNAL_SHELL_PREEXEC, SIGNAL_NOTIFICATION_RECEIVED, #endif SIGNAL_WINDOW_TITLE_CHANGED, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 4629c95f..dfa3c0b9 100644 +index 53737f65..987aec0e 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -686,6 +686,7 @@ public: +@@ -734,6 +734,7 @@ public: CWF = 1u << 2, #if _VTE_GTK == 3 NOTIFICATION = 1u << 3, @@ -722,10 +2048,10 @@ index 4629c95f..dfa3c0b9 100644 }; unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index dda487c4..f2c86b2c 100644 +index 7702c477..17fb51f5 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1402,6 +1402,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1302,6 +1302,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, m_notification_body = *token; return; } @@ -737,13 +2063,13 @@ index dda487c4..f2c86b2c 100644 #endif -- -2.40.0 +2.44.0 -From b3b23900327e439b50b29372ee89ce887e1c4d06 Mon Sep 17 00:00:00 2001 +From 1b4029e85ad578dc602fc23bc5be07cd1341cfd0 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 20 Apr 2018 18:21:53 +0200 -Subject: [PATCH 07/11] Test the shell-preexec signal +Subject: [PATCH 08/12] Test the shell-preexec signal https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 @@ -752,10 +2078,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 1 file changed, 7 insertions(+) diff --git a/src/app/app.cc b/src/app/app.cc -index a3cc9257..813b6d1d 100644 +index f1b96a33..4ccff275 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2301,6 +2301,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2960,6 +2960,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -768,22 +2094,22 @@ index a3cc9257..813b6d1d 100644 static void window_lower_window_cb(VteTerminal* terminal, VteappWindow* window) -@@ -2599,6 +2605,7 @@ vteapp_window_constructed(GObject *object) +@@ -3253,6 +3259,7 @@ vteapp_window_constructed(GObject *object) #if VTE_GTK == 3 g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); + g_signal_connect(window->terminal, "shell-preexec", G_CALLBACK(shell_preexec_cb), NULL); - /* Settings */ - if (options.no_double_buffer) { + if (!options.double_buffer) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; -- -2.40.0 +2.44.0 -From 2058ed67cd3d427fb06a25c58c69bf9d9ae35a5e Mon Sep 17 00:00:00 2001 +From 9f6f4ee417133de6149494036418497b1e620725 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 -Subject: [PATCH 08/11] Support precmd notifications from an interactive shell +Subject: [PATCH 09/12] Support precmd notifications from an interactive shell Add sequences OSC 777 ; precmd BEL @@ -809,10 +2135,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 7 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 32d3315a..98e60fcc 100644 +index e9e51434..94a9db05 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10230,6 +10230,12 @@ Terminal::emit_pending_signals() +@@ -10823,6 +10823,12 @@ Terminal::emit_pending_signals() "Emitting `shell-preexec'.\n"); g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); } @@ -826,23 +2152,23 @@ index 32d3315a..98e60fcc 100644 if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { diff --git a/src/vte.sh.in b/src/vte.sh.in -index 01b44e23..877fe93d 100644 +index ffc0942a..01e56c46 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in @@ -38,7 +38,7 @@ __vte_prompt_command() { - local pwd='~' - [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} - pwd="${pwd//[[:cntrl:]]}" -- printf '\033]777;notify;Command completed;%s\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" -+ printf '\033]777;notify;Command completed;%s\033\\\033]777;precmd\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" - __vte_osc7 + local pwd='~' + [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} + pwd="${pwd//[[:cntrl:]]}" +- printf '\033]777;notify;Command completed;%s\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" ++ printf '\033]777;notify;Command completed;%s\033\\\033]777;precmd\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" + __vte_osc7 } diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index d6721a52..e488dc40 100644 +index efd8732b..a2ff1b01 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -110,11 +110,8 @@ struct _VteTerminalClass { +@@ -115,11 +115,8 @@ struct _VteTerminalClass { #if _VTE_GTK == 3 void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); @@ -854,12 +2180,12 @@ index d6721a52..e488dc40 100644 - gpointer _extra_padding[1]; #endif /* _VTE_GTK == 3 */ - /* Add new vfuncs here, and subtract from the padding below. */ + void (*setup_context_menu)(VteTerminal* terminal, diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 8dd7ea50..00045f3a 100644 +index f8d971c1..d553a002 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -1275,6 +1275,7 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1385,6 +1385,7 @@ vte_terminal_class_init(VteTerminalClass *klass) klass->char_size_changed = NULL; #if _VTE_GTK == 3 klass->notification_received = NULL; @@ -867,7 +2193,7 @@ index 8dd7ea50..00045f3a 100644 klass->shell_preexec = NULL; #endif klass->window_title_changed = NULL; -@@ -1381,6 +1382,23 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -1491,6 +1492,23 @@ vte_terminal_class_init(VteTerminalClass *klass) G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); @@ -892,22 +2218,22 @@ index 8dd7ea50..00045f3a 100644 * VteTerminal::shell-preexec: * @vteterminal: the object which received the signal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 0c86fb6e..e871b946 100644 +index 6252a2c8..3798ebc3 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -53,6 +53,7 @@ enum { - SIGNAL_RESTORE_WINDOW, +@@ -54,6 +54,7 @@ enum { SIGNAL_SELECTION_CHANGED, + SIGNAL_SETUP_CONTEXT_MENU, #if _VTE_GTK == 3 + SIGNAL_SHELL_PRECMD, SIGNAL_SHELL_PREEXEC, SIGNAL_NOTIFICATION_RECEIVED, #endif diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index dfa3c0b9..b8e30d15 100644 +index 987aec0e..cfe2e0f0 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -687,6 +687,7 @@ public: +@@ -735,6 +735,7 @@ public: #if _VTE_GTK == 3 NOTIFICATION = 1u << 3, SHELL_PREEXEC = 1u << 4, @@ -916,10 +2242,10 @@ index dfa3c0b9..b8e30d15 100644 }; unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index f2c86b2c..bae18595 100644 +index 17fb51f5..a1155b19 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc -@@ -1403,7 +1403,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1303,7 +1303,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, return; } @@ -931,13 +2257,13 @@ index f2c86b2c..bae18595 100644 } } -- -2.40.0 +2.44.0 -From 468a91b1d8fe95f3bd814361777dd171b9de3df6 Mon Sep 17 00:00:00 2001 +From c8fbd37a4d7cefb2d97b2f585773cdcfe731e570 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 -Subject: [PATCH 09/11] Test the shell-precmd signal +Subject: [PATCH 10/12] Test the shell-precmd signal https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 @@ -946,10 +2272,10 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711060 1 file changed, 7 insertions(+) diff --git a/src/app/app.cc b/src/app/app.cc -index 813b6d1d..eb962e86 100644 +index 4ccff275..bfb3d9f8 100644 --- a/src/app/app.cc +++ b/src/app/app.cc -@@ -2301,6 +2301,12 @@ notification_received_cb(VteTerminal *terminal, +@@ -2960,6 +2960,12 @@ notification_received_cb(VteTerminal *terminal, g_print("[%s]: %s\n", summary, body); } @@ -962,22 +2288,22 @@ index 813b6d1d..eb962e86 100644 static void shell_preexec_cb(VteTerminal *terminal) { -@@ -2605,6 +2611,7 @@ vteapp_window_constructed(GObject *object) +@@ -3259,6 +3265,7 @@ vteapp_window_constructed(GObject *object) #if VTE_GTK == 3 g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); + g_signal_connect(window->terminal, "shell-precmd", G_CALLBACK(shell_precmd_cb), NULL); g_signal_connect(window->terminal, "shell-preexec", G_CALLBACK(shell_preexec_cb), NULL); - /* Settings */ + if (!options.double_buffer) { -- -2.40.0 +2.44.0 -From 329db6eea1479a91f7de428d0b97173f67348b7c Mon Sep 17 00:00:00 2001 +From 805a31048470d65a64151d5d7ab69da52d534128 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 -Subject: [PATCH 10/11] Support tracking the active container inside the +Subject: [PATCH 11/12] Support tracking the active container inside the terminal Add sequences @@ -1016,10 +2342,10 @@ agreed upon across multiple different terminal emulators [1]. 6 files changed, 211 insertions(+) diff --git a/src/vte.cc b/src/vte.cc -index 98e60fcc..92ab5711 100644 +index 94a9db05..645bf330 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -10236,6 +10236,14 @@ Terminal::emit_pending_signals() +@@ -10829,6 +10829,14 @@ Terminal::emit_pending_signals() "Emitting `shell-precmd'.\n"); g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PRECMD], 0); } @@ -1035,10 +2361,10 @@ index 98e60fcc..92ab5711 100644 if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index e488dc40..b1c70824 100644 +index a2ff1b01..6d07e28e 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h -@@ -566,6 +566,12 @@ _VTE_PUBLIC +@@ -571,6 +571,12 @@ _VTE_PUBLIC glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); _VTE_PUBLIC const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); @@ -1052,10 +2378,10 @@ index e488dc40..b1c70824 100644 const char *vte_terminal_get_current_directory_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); _VTE_PUBLIC diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 00045f3a..83ea636e 100644 +index d553a002..1af238e1 100644 --- a/src/vtegtk.cc +++ b/src/vtegtk.cc -@@ -963,6 +963,14 @@ try +@@ -1015,6 +1015,14 @@ try case PROP_CURSOR_BLINK_MODE: g_value_set_enum (value, vte_terminal_get_cursor_blink_mode (terminal)); break; @@ -1070,7 +2396,7 @@ index 00045f3a..83ea636e 100644 case PROP_CURRENT_DIRECTORY_URI: g_value_set_string (value, vte_terminal_get_current_directory_uri (terminal)); break; -@@ -2388,6 +2396,29 @@ vte_terminal_class_init(VteTerminalClass *klass) +@@ -2613,6 +2621,29 @@ vte_terminal_class_init(VteTerminalClass *klass) NULL, (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); @@ -1100,7 +2426,7 @@ index 00045f3a..83ea636e 100644 /** * VteTerminal:current-directory-uri: * -@@ -5204,6 +5235,58 @@ catch (...) +@@ -5547,6 +5578,58 @@ catch (...) return -1; } @@ -1160,11 +2486,11 @@ index 00045f3a..83ea636e 100644 * vte_terminal_get_current_directory_uri: * @terminal: a #VteTerminal diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index e871b946..0a31d205 100644 +index 3798ebc3..065a6744 100644 --- a/src/vtegtk.hh +++ b/src/vtegtk.hh -@@ -74,6 +74,10 @@ enum { - PROP_CJK_AMBIGUOUS_WIDTH, +@@ -77,6 +77,10 @@ enum { + PROP_CONTEXT_MENU, PROP_CURSOR_BLINK_MODE, PROP_CURSOR_SHAPE, +#if _VTE_GTK == 3 @@ -1175,10 +2501,10 @@ index e871b946..0a31d205 100644 PROP_CURRENT_FILE_URI, PROP_DELETE_BINDING, diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index b8e30d15..0c52442b 100644 +index cfe2e0f0..ccd81bef 100644 --- a/src/vteinternal.hh +++ b/src/vteinternal.hh -@@ -59,6 +59,9 @@ +@@ -63,6 +63,9 @@ #include #include #include @@ -1188,7 +2514,7 @@ index b8e30d15..0c52442b 100644 #include #include #include -@@ -110,6 +113,20 @@ typedef enum _VteCharacterReplacement { +@@ -121,6 +124,20 @@ typedef enum _VteCharacterReplacement { VTE_CHARACTER_REPLACEMENT_LINE_DRAWING } VteCharacterReplacement; @@ -1209,7 +2535,7 @@ index b8e30d15..0c52442b 100644 typedef struct _VtePaletteColor { struct { vte::color::rgb color; -@@ -666,6 +683,8 @@ public: +@@ -714,6 +731,8 @@ public: gboolean m_contents_changed_pending; #if _VTE_GTK == 3 @@ -1218,7 +2544,7 @@ index b8e30d15..0c52442b 100644 /* desktop notification */ std::string m_notification_summary; std::string m_notification_body; -@@ -688,6 +707,7 @@ public: +@@ -736,6 +755,7 @@ public: NOTIFICATION = 1u << 3, SHELL_PREEXEC = 1u << 4, SHELL_PRECMD = 1u << 5, @@ -1227,7 +2553,7 @@ index b8e30d15..0c52442b 100644 }; unsigned m_pending_changes{0}; diff --git a/src/vteseq.cc b/src/vteseq.cc -index bae18595..8a7f5b34 100644 +index a1155b19..daa24703 100644 --- a/src/vteseq.cc +++ b/src/vteseq.cc @@ -19,6 +19,7 @@ @@ -1250,7 +2576,7 @@ index bae18595..8a7f5b34 100644 using namespace std::literals; -@@ -1385,6 +1391,90 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, +@@ -1285,6 +1291,90 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, if (token == endtoken) return; @@ -1342,13 +2668,13 @@ index bae18595..8a7f5b34 100644 ++token; -- -2.40.0 +2.44.0 -From d1db595d6e91bd21dfc4ced7d6ae81ad851a20e9 Mon Sep 17 00:00:00 2001 +From 96549613fb68fbe811b82905e49801fc16030371 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 -Subject: [PATCH 11/11] Revert "widget: Limit select-all to the writable region +Subject: [PATCH 12/12] Revert "widget: Limit select-all to the writable region not including the scrollback" ... as decided by Fedora Workstation WG. @@ -1357,36 +2683,24 @@ https://pagure.io/fedora-workstation/issue/216 This reverts commit 73713ec0644e232fb740170e399282be778d97f9. --- - src/vte.cc | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) + src/vte.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vte.cc b/src/vte.cc -index 92ab5711..9527148c 100644 +index 645bf330..d8f0faec 100644 --- a/src/vte.cc +++ b/src/vte.cc -@@ -6552,10 +6552,7 @@ Terminal::maybe_end_selection() - /* - * Terminal::select_all: - * -- * Selects all text within the terminal. Note that we only select the writable -- * region, *not* the scrollback buffer, due to this potentially selecting so -- * much data that putting it on the clipboard either hangs the process for a long -- * time or even crash it directly. (FIXME!) -+ * Selects all text within the terminal (including the scrollback buffer). - */ - void - Terminal::select_all() -@@ -6564,8 +6561,8 @@ Terminal::select_all() +@@ -7081,8 +7081,8 @@ Terminal::select_all() m_selecting_had_delta = TRUE; -- m_selection_resolved.set({m_screen->insert_delta, 0}, -- {_vte_ring_next(m_screen->row_data), 0}); -+ m_selection_resolved.set ({ _vte_ring_delta (m_screen->row_data), 0 }, -+ { _vte_ring_next (m_screen->row_data), 0 }); +- m_selection_resolved.set ({ (vte::grid::row_t)m_screen->row_data->delta(), 0 }, +- { (vte::grid::row_t)m_screen->row_data->next(), 0 }); ++ m_selection_resolved.set ({ (long)m_screen->row_data->delta(), 0 }, ++ { (long)m_screen->row_data->next(), 0 }); _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); -- -2.40.0 +2.44.0 diff --git a/vte291.spec b/vte291.spec index 98b17f4..be32e3c 100644 --- a/vte291.spec +++ b/vte291.spec @@ -4,22 +4,22 @@ %global glib2_version 2.52.0 %global gnutls_version 3.2.7 %global gtk3_version 3.24.22 -%global gtk4_version 4.0.1 +%global gtk4_version 4.14.0 %global icu_uc_version 4.8 %global libsystemd_version 220 %global pango_version 1.22.0 %global pcre2_version 10.21 Name: vte291 -Version: 0.74.2 -Release: 4%{?dist} +Version: 0.76.0 +Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.74/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.76/vte-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 @@ -34,10 +34,10 @@ BuildRequires: pkgconfig(gobject-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version} BuildRequires: pkgconfig(gtk4) >= %{gtk4_version} BuildRequires: pkgconfig(icu-uc) >= %{icu_uc_version} +BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(libpcre2-8) >= %{pcre2_version} BuildRequires: pkgconfig(libsystemd) >= %{libsystemd_version} BuildRequires: pkgconfig(pango) >= %{pango_version} -BuildRequires: pkgconfig(zlib) BuildRequires: gcc-c++ BuildRequires: gettext BuildRequires: gi-docgen @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Tue Apr 02 2024 David King - 0.76.0-1 +- Update to 0.76.0 + * Mon Feb 12 2024 Tomas Popela - 0.74.2-4 - Build for the SPDX license format change From d52a62db6d53b0900184688991391c99edb077ec Mon Sep 17 00:00:00 2001 From: David King Date: Fri, 3 May 2024 08:51:36 +0100 Subject: [PATCH 052/102] Update to 0.76.1 --- .gitignore | 1 + sources | 2 +- vte291-cntnr-precmd-preexec-scroll.patch | 37 +++++++++++++++++++----- vte291.spec | 5 +++- 4 files changed, 35 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 8e09438..1acd5b1 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,4 @@ /vte-0.74.1.tar.xz /vte-0.74.2.tar.xz /vte-0.76.0.tar.xz +/vte-0.76.1.tar.xz diff --git a/sources b/sources index 532790f..15b1b8a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.76.0.tar.xz) = 4eccdac2eeb33ae76c67000081b3ae26b0872ac3c1b89517db87a1574dc1121992ad708a0ffced34e30a0fd351166552215cf897d722b53d2313d5b8deed2385 +SHA512 (vte-0.76.1.tar.xz) = 4baf944fa36e6c94cfd4adaa19dbe1bed26740e14565d5c81d002e6d57a33b171625e986a2fa0ffeba361063e631045dafe987dbf71ac478f97511f7a56c95df diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch index c0a6ace..32ac71e 100644 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ b/vte291-cntnr-precmd-preexec-scroll.patch @@ -2106,7 +2106,7 @@ index f1b96a33..4ccff275 100644 2.44.0 -From 9f6f4ee417133de6149494036418497b1e620725 Mon Sep 17 00:00:00 2001 +From 4e78d1bf97245c72aabe8bb971cadfd946c8cc17 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:20:30 +0200 Subject: [PATCH 09/12] Support precmd notifications from an interactive shell @@ -2126,13 +2126,13 @@ https://bugzilla.gnome.org/show_bug.cgi?id=711059 https://bugzilla.gnome.org/show_bug.cgi?id=711060 --- src/vte.cc | 6 ++++++ - src/vte.sh.in | 2 +- + src/vte.sh.in | 9 ++++++++- src/vte/vteterminal.h | 5 +---- src/vtegtk.cc | 18 ++++++++++++++++++ src/vtegtk.hh | 1 + src/vteinternal.hh | 1 + src/vteseq.cc | 4 +++- - 7 files changed, 31 insertions(+), 6 deletions(-) + 7 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/vte.cc b/src/vte.cc index e9e51434..94a9db05 100644 @@ -2152,18 +2152,39 @@ index e9e51434..94a9db05 100644 if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { diff --git a/src/vte.sh.in b/src/vte.sh.in -index ffc0942a..01e56c46 100644 +index ffc0942a..5b415f5b 100644 --- a/src/vte.sh.in +++ b/src/vte.sh.in -@@ -38,7 +38,7 @@ __vte_prompt_command() { +@@ -28,6 +28,11 @@ case "$TERM" in + *) return 0 ;; + esac + ++__vte_shell_precmd() { ++ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//') ++ command="${command//;/ }" ++ printf '\033]777;notify;Command completed;%s\033\\\033]777;precmd\033\\' "${command}" ++} + __vte_osc7 () { + printf "\033]7;file://%s%s\033\\" "${HOSTNAME}" "$(@libexecdir@/vte-urlencode-cwd)" + } +@@ -38,7 +43,8 @@ __vte_prompt_command() { local pwd='~' [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} pwd="${pwd//[[:cntrl:]]}" - printf '\033]777;notify;Command completed;%s\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" + printf '\033]777;notify;Command completed;%s\033\\\033]777;precmd\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" ++ __vte_shell_precmd __vte_osc7 } +@@ -51,6 +57,7 @@ if [[ -n "${BASH_VERSION:-}" ]]; then + # use the __vte_prompt_command function which also sets the title. + + if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then ++ PROMPT_COMMAND+=(__vte_shell_precmd) + PROMPT_COMMAND+=(__vte_osc7) && PS0=$(printf "\033]777;preexec\033\\") + else + PROMPT_COMMAND="__vte_prompt_command" && PS0=$(printf "\033]777;preexec\033\\") diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h index efd8732b..a2ff1b01 100644 --- a/src/vte/vteterminal.h @@ -2260,7 +2281,7 @@ index 17fb51f5..a1155b19 100644 2.44.0 -From c8fbd37a4d7cefb2d97b2f585773cdcfe731e570 Mon Sep 17 00:00:00 2001 +From 9424e6c777ea0a7488457ddc7649a39ee579a68b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 2 May 2018 17:30:48 +0200 Subject: [PATCH 10/12] Test the shell-precmd signal @@ -2300,7 +2321,7 @@ index 4ccff275..bfb3d9f8 100644 2.44.0 -From 805a31048470d65a64151d5d7ab69da52d534128 Mon Sep 17 00:00:00 2001 +From 2c262f071a679451312e141d940a8819ece44b52 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Mon, 10 Jun 2019 20:30:18 +0200 Subject: [PATCH 11/12] Support tracking the active container inside the @@ -2671,7 +2692,7 @@ index a1155b19..daa24703 100644 2.44.0 -From 96549613fb68fbe811b82905e49801fc16030371 Mon Sep 17 00:00:00 2001 +From 71a9ae3e685b492d50a23604865388cba7592d54 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 16 Feb 2021 16:30:44 +0100 Subject: [PATCH 12/12] Revert "widget: Limit select-all to the writable region diff --git a/vte291.spec b/vte291.spec index be32e3c..b97b070 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.76.0 +Version: 0.76.1 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Fri May 03 2024 David King - 0.76.1-1 +- Update to 0.76.1 + * Tue Apr 02 2024 David King - 0.76.0-1 - Update to 0.76.0 From 2eac94bc7f6f5274924768063173633f849f83cc Mon Sep 17 00:00:00 2001 From: David King Date: Tue, 14 May 2024 20:21:13 +0100 Subject: [PATCH 053/102] Use SPDX license expression for gtk4 subpackage --- vte291.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index b97b070..522a847 100644 --- a/vte291.spec +++ b/vte291.spec @@ -68,7 +68,7 @@ console/terminal in games, editors, IDEs, etc. Summary: GTK4 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources -License: LGPLv3+ and MIT +License: LGPL-3.0-or-later AND MIT AND X11 Requires: %{name}%{?_isa} = %{version}-%{release} From 5259739a74bc70754247b33195a09412738df036 Mon Sep 17 00:00:00 2001 From: David King Date: Tue, 28 May 2024 08:43:34 +0100 Subject: [PATCH 054/102] Update to 0.76.2 --- .gitignore | 1 + sources | 2 +- vte291.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1acd5b1..11b2a42 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,4 @@ /vte-0.74.2.tar.xz /vte-0.76.0.tar.xz /vte-0.76.1.tar.xz +/vte-0.76.2.tar.xz diff --git a/sources b/sources index 15b1b8a..1f4ac86 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.76.1.tar.xz) = 4baf944fa36e6c94cfd4adaa19dbe1bed26740e14565d5c81d002e6d57a33b171625e986a2fa0ffeba361063e631045dafe987dbf71ac478f97511f7a56c95df +SHA512 (vte-0.76.2.tar.xz) = 206e2706c926972d4f389cf0418b840345ba6eb0336a3cae8b0d604f773b8b86746ef4986c94cfd6b0716449351ecb51a62f3ba08885b9cc8c8a8580e75f7fbf diff --git a/vte291.spec b/vte291.spec index 522a847..7008c8b 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.76.1 +Version: 0.76.2 Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Tue May 28 2024 David King - 0.76.2-1 +- Update to 0.76.2 + * Fri May 03 2024 David King - 0.76.1-1 - Update to 0.76.1 From af91b0972e4948c36152952336c147ef0e137727 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 6 Jun 2024 14:05:45 -0400 Subject: [PATCH 055/102] Update patches for ptyxis --- 0001-a11y-implement-GtkAccessibleText.patch | 1324 ++++++++ ...otification-and-shell-precmd-preexec.patch | 533 ++++ vte291-cntnr-precmd-preexec-scroll.patch | 2727 ----------------- 3 files changed, 1857 insertions(+), 2727 deletions(-) create mode 100644 0001-a11y-implement-GtkAccessibleText.patch create mode 100644 0001-add-notification-and-shell-precmd-preexec.patch delete mode 100644 vte291-cntnr-precmd-preexec-scroll.patch diff --git a/0001-a11y-implement-GtkAccessibleText.patch b/0001-a11y-implement-GtkAccessibleText.patch new file mode 100644 index 0000000..4361311 --- /dev/null +++ b/0001-a11y-implement-GtkAccessibleText.patch @@ -0,0 +1,1324 @@ +From aa096f3c96d8f4a736be7fdb48103daffd332296 Mon Sep 17 00:00:00 2001 +From: Christian Hergert +Date: Mon, 4 Mar 2024 14:09:53 -0800 +Subject: [PATCH] a11y: implement GtkAccessibleText + +This is an initial implementaiton of GtkAccessibleText which was added +to GTK for 4.14. It attempts to implement things in a very similar +fashion to the previous code for GTK 3 although considerable effort was +made to simplify and improve readability as to how it works. + +Currently, this supports reading back what you type and what has changed +on screen. It is not yet 1:1 what the GTK 3 a11y implementation did +because ATK was doing many other things (including proxying keyboard +keys) to the other side of the a11y bus. That appears to improve +readback by screen readers in the form of "backspace" and what character +was deleted. + +I expect things to get closer to 1:1 but that work is going to have to +be done inside of GTK itself first and should not require much if +anything here. + +A new VteTerminal:enable-a11y feature flag property has been added +because I'm concerned about enabling this by default until the a11y bus +learns to be more lazy. Currently there is no way to "do nothing" until +a peer (e.g. screenreader) is interested in the contents. + +Ideally, we would have a short-circuit like is currently implemented +by checking vte_terminal_get_enable_a11y() to avoid any sort of +contents calculation when there are no a11y observers. + +It also allows disabling the GTK 3 a11y implementation just to keep +some symmetry between the APIs. + +Currently, this does not implement "text-scrolled" like the GTK 3 +implementation does as I'm not sure yet if there is a benefit. +--- + src/meson.build | 13 +- + src/vte.cc | 11 + + src/vte/vteterminal.h | 7 + + src/vteaccess-gtk4.cc | 874 ++++++++++++++++++++++++++++++++++++++++++ + src/vteaccess-gtk4.h | 25 ++ + src/vteaccess.cc | 21 + + src/vtegtk.cc | 97 ++++- + src/vtegtk.hh | 1 + + src/vteinternal.hh | 8 + + 10 files changed, 1053 insertions(+), 10 deletions(-) + create mode 100644 src/vteaccess-gtk4.cc + create mode 100644 src/vteaccess-gtk4.h + +diff --git a/src/meson.build b/src/meson.build +index 3f89f492..6d1b4b2b 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -18,11 +18,16 @@ subdir('vte') + + src_inc = include_directories('.') + +-a11y_sources = files( ++a11y_gtk3_sources = files( + 'vteaccess.cc', + 'vteaccess.h', + ) + ++a11y_gtk4_sources = files( ++ 'vteaccess-gtk4.cc', ++ 'vteaccess-gtk4.h', ++) ++ + debug_sources = files( + 'debug.cc', + 'debug.h', +@@ -300,7 +305,7 @@ if get_option('gtk3') + libvte_gtk3_public_deps = libvte_common_public_deps + [gtk3_dep,] + + if get_option('a11y') +- libvte_gtk3_sources += a11y_sources ++ libvte_gtk3_sources += a11y_gtk3_sources + endif + + libvte_gtk3 = shared_library( +@@ -349,6 +354,10 @@ if get_option('gtk4') + libvte_gtk4_deps = libvte_common_deps + [gtk4_dep,] + libvte_gtk4_public_deps = libvte_common_public_deps + [gtk4_dep,] + ++ if get_option('a11y') ++ libvte_gtk4_sources += a11y_gtk4_sources ++ endif ++ + libvte_gtk4 = shared_library( + vte_gtk4_api_name, + sources: libvte_gtk4_sources, +diff --git a/src/vte.cc b/src/vte.cc +index a8a0e22c..4d9bf411 100644 +--- a/src/vte.cc ++++ b/src/vte.cc +@@ -10132,6 +10132,17 @@ Terminal::set_text_blink_mode(TextBlinkMode setting) + return true; + } + ++bool ++Terminal::set_enable_a11y(bool setting) ++{ ++ if (setting == m_enable_a11y) ++ return false; ++ ++ m_enable_a11y = setting; ++ ++ return true; ++} ++ + bool + Terminal::set_enable_bidi(bool setting) + { +diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h +index 9c2e2dae..7f4bf6df 100644 +--- a/src/vte/vteterminal.h ++++ b/src/vte/vteterminal.h +@@ -388,6 +388,13 @@ _VTE_PUBLIC + void vte_terminal_set_delete_binding(VteTerminal *terminal, + VteEraseBinding binding) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); + ++/* Accessibility */ ++_VTE_PUBLIC ++void vte_terminal_set_enable_a11y(VteTerminal *terminal, ++ gboolean enable_a11y) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); ++_VTE_PUBLIC ++gboolean vte_terminal_get_enable_a11y(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); ++ + /* BiDi and shaping */ + _VTE_PUBLIC + void vte_terminal_set_enable_bidi(VteTerminal *terminal, +diff --git a/src/vteaccess-gtk4.cc b/src/vteaccess-gtk4.cc +new file mode 100644 +index 00000000..f42e7578 +--- /dev/null ++++ b/src/vteaccess-gtk4.cc +@@ -0,0 +1,874 @@ ++/* ++ * Copyright © 2024 Christian Hergert ++ * Copyright © 2002,2003 Red Hat, Inc. ++ * ++ * This library is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as published ++ * by the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public License ++ * along with this library. If not, see . ++ */ ++ ++#include "config.h" ++ ++#include "vteinternal.hh" ++#include "vteaccess-gtk4.h" ++ ++#define GDK_ARRAY_NAME char_positions ++#define GDK_ARRAY_TYPE_NAME CharPositions ++#define GDK_ARRAY_ELEMENT_TYPE int ++#define GDK_ARRAY_BY_VALUE 1 ++#define GDK_ARRAY_PREALLOC 8 ++#define GDK_ARRAY_NO_MEMSET ++#include "gdkarrayimpl.c" ++ ++typedef struct _VteAccessibleTextContents ++{ ++ /* A GdkArrayImpl of attributes per byte */ ++ VteCharAttrList attrs; ++ ++ /* The byte position within the UTF-8 string where each visible ++ * character starts. ++ */ ++ CharPositions characters; ++ ++ /* The character position within the UTF-8 string where each line ++ * break occurs. To get byte offset, use @characters. ++ */ ++ CharPositions linebreaks; ++ ++ /* The UTF-8 string encoded as bytes so that we may reference it ++ * using GBytes for "substrings". However @string does include a ++ * trailing NUL byte in it's size so that the a11y infrastructure ++ * may elide some string copies. ++ */ ++ GBytes *string; ++ ++ /* Number of bytes in @string excluding trailing NUL. */ ++ gsize n_bytes; ++ ++ /* Number of unicode characters in @string. */ ++ gsize n_chars; ++ ++ /* The character position (not bytes) of the caret in @string */ ++ gsize caret; ++ ++ /* Cached column/row of the caret updated each time we are notified ++ * of the caret having moved. We cache this so that we can elide ++ * extraneous notifications after snapshoting. We will update the ++ * carent position synchronously when notified so @caret may always ++ * be relied upon as correct. ++ */ ++ long cached_caret_column; ++ long cached_caret_row; ++} VteAccessibleTextContents; ++ ++typedef struct _VteAccessibleText ++{ ++ VteTerminal *terminal; ++ VteAccessibleTextContents contents[2]; ++ guint contents_flip : 1; ++} VteAccessibleText; ++ ++static inline gboolean ++_pango_color_equal(const PangoColor *a, ++ const PangoColor *b) ++{ ++ return a->red == b->red && ++ a->green == b->green && ++ a->blue == b->blue; ++} ++ ++static void ++vte_accessible_text_contents_init (VteAccessibleTextContents *contents) ++{ ++ vte_char_attr_list_init (&contents->attrs); ++ char_positions_init (&contents->characters); ++ char_positions_init (&contents->linebreaks); ++ contents->string = nullptr; ++ contents->n_bytes = 0; ++ contents->n_chars = 0; ++ contents->caret = 0; ++ contents->cached_caret_row = 0; ++ contents->cached_caret_column = 0; ++} ++ ++static void ++vte_accessible_text_contents_clear (VteAccessibleTextContents *contents) ++{ ++ vte_char_attr_list_clear (&contents->attrs); ++ char_positions_clear (&contents->characters); ++ char_positions_clear (&contents->linebreaks); ++ g_clear_pointer (&contents->string, g_bytes_unref); ++ contents->n_bytes = 0; ++ contents->n_chars = 0; ++ contents->caret = 0; ++ contents->cached_caret_row = 0; ++ contents->cached_caret_column = 0; ++} ++ ++static void ++vte_accessible_text_contents_reset (VteAccessibleTextContents *contents) ++{ ++ vte_char_attr_list_set_size (&contents->attrs, 0); ++ char_positions_set_size (&contents->characters, 0); ++ char_positions_set_size (&contents->linebreaks, 0); ++ g_clear_pointer (&contents->string, g_bytes_unref); ++ contents->n_bytes = 0; ++ contents->n_chars = 0; ++ contents->caret = 0; ++ contents->cached_caret_row = 0; ++ contents->cached_caret_column = 0; ++} ++ ++static const char * ++vte_accessible_text_contents_get_string (VteAccessibleTextContents *contents, ++ gsize *len) ++{ ++ const char *ret; ++ ++ if (contents->string == nullptr || g_bytes_get_size (contents->string) == 0) { ++ *len = 0; ++ return ""; ++ } ++ ++ ret = (const char *)g_bytes_get_data (contents->string, len); ++ ++ if (*len > 0) { ++ (*len)--; ++ } ++ ++ return ret; ++} ++ ++static int ++vte_accessible_text_contents_offset_from_xy (VteAccessibleTextContents *contents, ++ int x, ++ int y) ++{ ++ int offset; ++ int linebreak; ++ int next_linebreak; ++ ++ if (y >= int(char_positions_get_size (&contents->linebreaks))) { ++ y = int(char_positions_get_size (&contents->linebreaks)) - 1; ++ if (y < 0) { ++ return 0; ++ } ++ } ++ ++ linebreak = *char_positions_index (&contents->linebreaks, y); ++ if (y + 1 == int(char_positions_get_size (&contents->linebreaks))) { ++ next_linebreak = int(char_positions_get_size (&contents->characters)); ++ } else { ++ next_linebreak = *char_positions_index (&contents->linebreaks, y + 1); ++ } ++ ++ offset = linebreak + x; ++ if (offset >= next_linebreak) { ++ offset = next_linebreak - 1; ++ } ++ ++ return offset; ++} ++ ++static gunichar ++vte_accessible_text_contents_get_char_at (VteAccessibleTextContents *contents, ++ guint offset) ++{ ++ const char *str; ++ ++ if (contents->string == nullptr) ++ return 0; ++ ++ if (offset >= contents->n_chars) ++ return 0; ++ ++ g_assert (offset < char_positions_get_size (&contents->characters)); ++ ++ str = (const char *)g_bytes_get_data (contents->string, nullptr); ++ str += *char_positions_index (&contents->characters, offset); ++ ++ return g_utf8_get_char (str); ++ ++} ++ ++static GBytes * ++_g_string_free_to_bytes_with_nul (GString *str) ++{ ++ /* g_string_free_to_bytes() will have a trailing-NUL but not include it ++ * in the size of the GBytes. We want the size included in our GBytes ++ * so that GtkAccessibleText may avoid some copies. ++ */ ++ gsize len = str->len + 1; ++ return g_bytes_new_take (g_string_free (str, FALSE), len); ++} ++ ++static inline gsize ++vte_accessible_text_contents_find_caret (VteAccessibleTextContents *contents, ++ long ccol, ++ long crow) ++{ ++ g_assert (contents != nullptr); ++ ++ /* Get the offsets to the beginnings of each line. */ ++ gsize caret = 0; ++ for (gsize i = 0; i < char_positions_get_size (&contents->characters); i++) { ++ /* Get the attributes for the current cell. */ ++ int offset = *char_positions_index (&contents->characters, i); ++ const struct _VteCharAttributes *attrs = vte_char_attr_list_get (&contents->attrs, offset); ++ ++ /* If this cell is "before" the cursor, move the caret to be "here". */ ++ if ((attrs->row < crow) || ++ ((attrs->row == crow) && (attrs->column < ccol))) { ++ caret = i + 1; ++ } ++ } ++ ++ return caret; ++} ++ ++static void ++vte_accessible_text_contents_snapshot (VteAccessibleTextContents *contents, ++ VteTerminal *terminal) ++{ ++ auto impl = _vte_terminal_get_impl (terminal); ++ GString *gstr = g_string_new (nullptr); ++ ++ try { ++ impl->get_text_displayed_a11y (gstr, &contents->attrs); ++ } catch (...) { ++ g_string_truncate (gstr, 0); ++ } ++ ++ if (vte_char_attr_list_get_size (&contents->attrs) >= G_MAXINT) { ++ g_string_truncate (gstr, 0); ++ return; ++ } ++ ++ /* Get the offsets to the beginnings of each character. */ ++ int i = 0; ++ const char *next = gstr->str; ++ int n_attrs = int(vte_char_attr_list_get_size (&contents->attrs)); ++ while (i < n_attrs) { ++ char_positions_append (&contents->characters, &i); ++ next = g_utf8_next_char (next); ++ if (next != nullptr) { ++ i = next - gstr->str; ++ continue; ++ } ++ break; ++ } ++ ++ /* Find offsets for the beginning of lines. */ ++ gsize n_chars = char_positions_get_size (&contents->characters); ++ int row; ++ for (i = 0, row = 0; i < int(n_chars); i++) { ++ /* Get the attributes for the current cell. */ ++ int offset = *char_positions_index (&contents->characters, i); ++ const struct _VteCharAttributes *attrs = vte_char_attr_list_get (&contents->attrs, offset); ++ ++ /* If this character is on a row different from the row ++ * the character we looked at previously was on, then ++ * it's a new line and we need to keep track of where ++ * it is. */ ++ if ((i == 0) || (attrs->row != row)) { ++ _vte_debug_print (VTE_DEBUG_ALLY, ++ "Row %d/%ld begins at %d.\n", ++ int(char_positions_get_size (&contents->linebreaks)), ++ attrs->row, i); ++ char_positions_append (&contents->linebreaks, &i); ++ } ++ ++ row = attrs->row; ++ } ++ ++ /* Add the final line break. */ ++ char_positions_append (&contents->linebreaks, &i); ++ ++ /* Update the caret position. */ ++ long ccol, crow; ++ vte_terminal_get_cursor_position (terminal, &ccol, &crow); ++ _vte_debug_print (VTE_DEBUG_ALLY, "Cursor at (%ld, " "%ld).\n", ccol, crow); ++ gsize caret = vte_accessible_text_contents_find_caret (contents, ccol, crow); ++ ++ contents->n_bytes = gstr->len; ++ contents->n_chars = n_chars; ++ contents->string = _g_string_free_to_bytes_with_nul (gstr); ++ contents->caret = caret; ++ contents->cached_caret_column = ccol; ++ contents->cached_caret_row = crow; ++ ++ _vte_debug_print (VTE_DEBUG_ALLY, ++ "Refreshed accessibility snapshot, " ++ "%ld cells, %ld characters.\n", ++ long(vte_char_attr_list_get_size(&contents->attrs)), ++ long(char_positions_get_size (&contents->characters))); ++} ++ ++static GBytes * ++vte_accessible_text_contents_slice (VteAccessibleTextContents *contents, ++ guint start, ++ guint end) ++{ ++ static const char empty[] = {0}; ++ guint start_offset; ++ guint end_offset; ++ ++ g_assert (contents != nullptr); ++ ++ if (contents->string == nullptr) ++ return g_bytes_new_static (empty, sizeof empty); ++ ++ if (start > contents->n_chars) ++ start = contents->n_chars; ++ ++ if (end > contents->n_chars) ++ end = contents->n_chars; ++ ++ if (end < start) ++ std::swap (end, start); ++ ++ g_assert (start <= char_positions_get_size (&contents->characters)); ++ g_assert (end <= char_positions_get_size (&contents->characters)); ++ ++ if (start == char_positions_get_size (&contents->characters)) ++ start_offset = g_bytes_get_size (contents->string); ++ else ++ start_offset = *char_positions_index (&contents->characters, start); ++ ++ if (end == char_positions_get_size (&contents->characters)) ++ end_offset = g_bytes_get_size (contents->string); ++ else ++ end_offset = *char_positions_index (&contents->characters, end); ++ ++ g_assert (start_offset <= end_offset); ++ ++ if (start_offset == end_offset) ++ return g_bytes_new_static (empty, sizeof empty); ++ ++ return g_bytes_new_from_bytes (contents->string, start_offset, end_offset - start_offset); ++} ++ ++static void ++vte_accessible_text_free (VteAccessibleText *state) ++{ ++ vte_accessible_text_contents_clear (&state->contents[0]); ++ vte_accessible_text_contents_clear (&state->contents[1]); ++ state->terminal = nullptr; ++ g_free (state); ++} ++ ++static VteAccessibleText * ++vte_accessible_text_get (VteTerminal *terminal) ++{ ++ return (VteAccessibleText *)g_object_get_data (G_OBJECT (terminal), "VTE_ACCESSIBLE_TEXT"); ++} ++ ++static GBytes * ++vte_accessible_text_get_contents (GtkAccessibleText *accessible, ++ guint start, ++ guint end) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ VteAccessibleTextContents *contents = nullptr; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ contents = &state->contents[state->contents_flip]; ++ ++ return vte_accessible_text_contents_slice (contents, start, end); ++} ++ ++static GBytes * ++vte_accessible_text_get_contents_at (GtkAccessibleText *accessible, ++ guint offset, ++ GtkAccessibleTextGranularity granularity, ++ guint *start, ++ guint *end) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ VteAccessibleTextContents *contents; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ auto impl = _vte_terminal_get_impl (terminal); ++ ++ contents = &state->contents[state->contents_flip]; ++ ++ if (contents->string == nullptr) { ++ return nullptr; ++ } ++ ++ if (offset > contents->n_chars) { ++ offset = contents->n_chars; ++ } ++ ++ switch (granularity) { ++ case GTK_ACCESSIBLE_TEXT_GRANULARITY_CHARACTER: { ++ *start = offset; ++ *end = offset + 1; ++ return vte_accessible_text_contents_slice (contents, offset, offset + 1); ++ } ++ ++ case GTK_ACCESSIBLE_TEXT_GRANULARITY_LINE: { ++ guint char_offset = *char_positions_index (&contents->characters, offset); ++ guint line; ++ ++ for (line = 0; ++ line < char_positions_get_size (&contents->linebreaks); ++ line++) { ++ guint line_offset = *char_positions_index (&contents->linebreaks, line); ++ ++ if (line_offset > char_offset) { ++ line--; ++ break; ++ } ++ } ++ ++ _vte_debug_print (VTE_DEBUG_ALLY, ++ "Character %u is on line %u.\n", ++ offset, line); ++ ++ *start = *char_positions_index (&contents->linebreaks, line); ++ if (line + 1 < char_positions_get_size (&contents->linebreaks)) ++ *end = *char_positions_index (&contents->linebreaks, line + 1); ++ else ++ *end = contents->n_chars; ++ ++ return vte_accessible_text_contents_slice (contents, *start, *end); ++ } ++ ++ case GTK_ACCESSIBLE_TEXT_GRANULARITY_WORD: { ++ gunichar ch = vte_accessible_text_contents_get_char_at (contents, offset); ++ ++ if (ch == 0 || !impl->is_word_char (ch)) ++ break; ++ ++ *start = offset; ++ *end = offset; ++ ++ while (*start > 0 && ++ (ch = vte_accessible_text_contents_get_char_at (contents, *start - 1)) && ++ impl->is_word_char (ch)) { ++ (*start)--; ++ } ++ ++ while (*end < contents->n_chars && ++ (ch = vte_accessible_text_contents_get_char_at (contents, *end + 1)) && ++ impl->is_word_char (ch)) { ++ (*end)++; ++ } ++ ++ return vte_accessible_text_contents_slice (contents, *start, *end); ++ } ++ ++ case GTK_ACCESSIBLE_TEXT_GRANULARITY_SENTENCE: ++ case GTK_ACCESSIBLE_TEXT_GRANULARITY_PARAGRAPH: ++ default: ++ break; ++ } ++ ++ return nullptr; ++} ++ ++static guint ++vte_accessible_text_get_caret_position (GtkAccessibleText *accessible) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ ++ g_assert (VTE_IS_TERMINAL (accessible)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ return state->contents[state->contents_flip].caret; ++} ++ ++static gboolean ++vte_accessible_text_get_selection (GtkAccessibleText *accessible, ++ gsize *n_ranges, ++ GtkAccessibleTextRange **ranges) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (ranges != nullptr); ++ ++ *n_ranges = 0; ++ *ranges = nullptr; ++ ++ try { ++ auto impl = _vte_terminal_get_impl (terminal); ++ VteAccessibleTextContents *contents = &state->contents[state->contents_flip]; ++ GtkAccessibleTextRange range; ++ ++ if (impl->m_selection_resolved.empty() || ++ impl->m_selection[vte::to_integral(vte::platform::ClipboardType::PRIMARY)] == nullptr) ++ return FALSE; ++ ++ auto start_column = impl->m_selection_resolved.start_column(); ++ auto start_row = impl->m_selection_resolved.start_row(); ++ auto end_column = impl->m_selection_resolved.end_column(); ++ auto end_row = impl->m_selection_resolved.end_row(); ++ ++ auto start_offset = vte_accessible_text_contents_offset_from_xy (contents, start_column, start_row); ++ auto end_offset = vte_accessible_text_contents_offset_from_xy (contents, end_column, end_row); ++ ++ range.start = gsize(start_offset); ++ range.length = gsize(end_offset - start_offset); ++ ++ *n_ranges = 1; ++ *ranges = (GtkAccessibleTextRange *)g_memdup2 (&range, sizeof range); ++ ++ return TRUE; ++ } catch (...) { } ++ ++ return FALSE; ++} ++ ++static gboolean ++vte_accessible_text_get_attributes (GtkAccessibleText *accessible, ++ guint offset, ++ gsize *n_ranges, ++ GtkAccessibleTextRange **ranges, ++ char ***attribute_names, ++ char ***attribute_values) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ VteAccessibleTextContents *contents; ++ struct _VteCharAttributes cur_attr; ++ struct _VteCharAttributes attr; ++ GtkAccessibleTextRange range; ++ struct { ++ const char *name; ++ const char *value; ++ } attrs[4]; ++ char fg_color[16]; ++ char bg_color[16]; ++ guint n_attrs = 0; ++ guint start = 0; ++ guint end = 0; ++ guint i; ++ ++ g_assert (VTE_IS_TERMINAL (accessible)); ++ g_assert (ranges != nullptr); ++ g_assert (attribute_names != nullptr); ++ g_assert (attribute_values != nullptr); ++ ++ contents = &state->contents[state->contents_flip]; ++ ++ *n_ranges = 0; ++ *ranges = nullptr; ++ *attribute_names = nullptr; ++ *attribute_values = nullptr; ++ ++ attr = *vte_char_attr_list_get (&contents->attrs, offset); ++ start = 0; ++ for (i = offset; i--;) { ++ cur_attr = *vte_char_attr_list_get (&contents->attrs, i); ++ if (!_pango_color_equal (&cur_attr.fore, &attr.fore) || ++ !_pango_color_equal (&cur_attr.back, &attr.back) || ++ cur_attr.underline != attr.underline || ++ cur_attr.strikethrough != attr.strikethrough) { ++ start = i + 1; ++ break; ++ } ++ } ++ end = vte_char_attr_list_get_size (&contents->attrs) - 1; ++ for (i = offset + 1; i < vte_char_attr_list_get_size (&contents->attrs); i++) { ++ cur_attr = *vte_char_attr_list_get (&contents->attrs, i); ++ if (!_pango_color_equal (&cur_attr.fore, &attr.fore) || ++ !_pango_color_equal (&cur_attr.back, &attr.back) || ++ cur_attr.underline != attr.underline || ++ cur_attr.strikethrough != attr.strikethrough) { ++ end = i - 1; ++ break; ++ } ++ } ++ ++ range.start = start; ++ range.length = end - start; ++ ++ if (range.length == 0) ++ return FALSE; ++ ++ if (attr.underline) { ++ attrs[n_attrs].name = "underline"; ++ attrs[n_attrs].value = "true"; ++ n_attrs++; ++ } ++ ++ if (attr.strikethrough) { ++ attrs[n_attrs].name = "strikethrough"; ++ attrs[n_attrs].value = "true"; ++ n_attrs++; ++ } ++ ++ g_snprintf (fg_color, sizeof fg_color, "%u,%u,%u", ++ attr.fore.red, attr.fore.green, attr.fore.blue); ++ attrs[n_attrs].name = "fg-color"; ++ attrs[n_attrs].value = fg_color; ++ n_attrs++; ++ ++ g_snprintf (bg_color, sizeof bg_color, "%u,%u,%u", ++ attr.back.red, attr.back.green, attr.back.blue); ++ attrs[n_attrs].name = "bg-color"; ++ attrs[n_attrs].value = bg_color; ++ n_attrs++; ++ ++ *attribute_names = g_new0 (char *, n_attrs + 1); ++ *attribute_values = g_new0 (char *, n_attrs + 1); ++ *n_ranges = 1; ++ *ranges = (GtkAccessibleTextRange *)g_memdup2 (&range, sizeof range); ++ ++ for (i = 0; i < n_attrs; i++) { ++ (*attribute_names)[i] = g_strdup (attrs[i].name); ++ (*attribute_values)[i] = g_strdup (attrs[i].value); ++ } ++ ++ return TRUE; ++} ++ ++void ++_vte_accessible_text_iface_init (GtkAccessibleTextInterface *iface) ++{ ++ iface->get_attributes = vte_accessible_text_get_attributes; ++ iface->get_caret_position = vte_accessible_text_get_caret_position; ++ iface->get_contents = vte_accessible_text_get_contents; ++ iface->get_contents_at = vte_accessible_text_get_contents_at; ++ iface->get_selection = vte_accessible_text_get_selection; ++} ++ ++static void ++vte_accessible_text_contents_changed (VteTerminal *terminal, ++ VteAccessibleText *state) ++{ ++ VteAccessibleTextContents *next = nullptr; ++ VteAccessibleTextContents *prev = nullptr; ++ const char *nextstr; ++ const char *prevstr; ++ gsize prevlen; ++ gsize nextlen; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ ++ prev = &state->contents[state->contents_flip]; ++ next = &state->contents[!state->contents_flip]; ++ ++ /* Get a new snapshot of contents so that we can compare this to the ++ * previous contents. That way we can discover if it was a backspace ++ * that occurred or if it's more than that. ++ * ++ * We do not filp state->contents_flip immediately so that we can ++ * allow the AT context the ability to access the current contents ++ * on DELETE operations. ++ */ ++ vte_accessible_text_contents_reset (next); ++ vte_accessible_text_contents_snapshot (next, state->terminal); ++ ++ nextstr = vte_accessible_text_contents_get_string (next, &nextlen); ++ prevstr = vte_accessible_text_contents_get_string (prev, &prevlen); ++ ++ vte_assert_cmpint (char_positions_get_size (&prev->characters), ==, prev->n_chars); ++ vte_assert_cmpint (char_positions_get_size (&next->characters), ==, next->n_chars); ++ ++ /* NOTE: ++ * ++ * The code below is based upon what vteaccess.cc did for GTK 3. ++ * It does not do any sort of appropriate diffing to try to handle ++ * scrolling correctly. That would be a good idea to implement in ++ * the longer term. ++ * ++ * It just looks for a long prefix match, and then a long suffix ++ * match and attempts to diff what is between those to end points. ++ */ ++ ++ const char *prevc = prevstr; ++ const char *nextc = nextstr; ++ gsize offset = 0; ++ ++ /* Find the beginning of changes */ ++ while ((offset < prev->n_chars) && (offset < next->n_chars)) { ++ gunichar prevch = g_utf8_get_char (prevc); ++ gunichar nextch = g_utf8_get_char (nextc); ++ ++ if (prevch != nextch) { ++ break; ++ } ++ ++ offset++; ++ ++ prevc = g_utf8_next_char (prevc); ++ nextc = g_utf8_next_char (nextc); ++ } ++ ++ /* Find the end of changes */ ++ gsize next_end = next->n_chars; ++ gsize prev_end = prev->n_chars; ++ ++ prevc = prevstr + prevlen; ++ nextc = nextstr + nextlen; ++ ++ while ((next_end > offset) && (prev_end > offset)) { ++ prevc = g_utf8_prev_char (prevc); ++ nextc = g_utf8_prev_char (nextc); ++ ++ gunichar prevch = g_utf8_get_char (prevc); ++ gunichar nextch = g_utf8_get_char (nextc); ++ ++ if (prevch != nextch) { ++ break; ++ } ++ ++ next_end--; ++ prev_end--; ++ } ++ ++ if (offset < prev_end) { ++ gtk_accessible_text_update_contents (GTK_ACCESSIBLE_TEXT (terminal), ++ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE, ++ offset, prev_end); ++ } ++ ++ state->contents_flip = !state->contents_flip; ++ ++ if (offset < next_end) { ++ gtk_accessible_text_update_contents (GTK_ACCESSIBLE_TEXT (terminal), ++ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT, ++ offset, next_end); ++ } ++ ++ if (prev->caret != next->caret) { ++ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); ++ } ++} ++ ++static void ++vte_accessible_text_cursor_moved (VteTerminal *terminal, ++ VteAccessibleText *state) ++{ ++ VteAccessibleTextContents *contents = nullptr; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ ++ contents = &state->contents[state->contents_flip]; ++ ++ long ccol, crow; ++ vte_terminal_get_cursor_position (terminal, &ccol, &crow); ++ if (ccol == contents->cached_caret_column && crow == contents->cached_caret_row) { ++ return; ++ } ++ ++ _vte_debug_print (VTE_DEBUG_ALLY, "Cursor at (%ld, " "%ld).\n", ccol, crow); ++ ++ contents->cached_caret_column = ccol; ++ contents->cached_caret_row = crow; ++ contents->caret = vte_accessible_text_contents_find_caret (contents, ccol, crow); ++ ++ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); ++} ++ ++static void ++vte_accessible_text_window_title_changed (VteTerminal *terminal, ++ VteAccessibleText *state) ++{ ++ const char *window_title; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ ++ window_title = vte_terminal_get_window_title (terminal); ++ ++ gtk_accessible_update_property (GTK_ACCESSIBLE (terminal), ++ GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, window_title ? window_title : "", ++ GTK_ACCESSIBLE_VALUE_UNDEFINED); ++} ++ ++static void ++vte_accessible_text_selection_changed (VteTerminal *terminal, ++ VteAccessibleText *state) ++{ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ ++ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); ++ gtk_accessible_text_update_selection_bound (GTK_ACCESSIBLE_TEXT (terminal)); ++} ++ ++void ++_vte_accessible_text_init (GtkAccessibleText *accessible) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state; ++ ++ state = g_new0 (VteAccessibleText, 1); ++ state->terminal = terminal; ++ ++ vte_accessible_text_contents_init (&state->contents[0]); ++ vte_accessible_text_contents_init (&state->contents[1]); ++ ++ g_object_set_data_full (G_OBJECT (terminal), ++ "VTE_ACCESSIBLE_TEXT", ++ state, ++ (GDestroyNotify)vte_accessible_text_free); ++ ++ g_signal_connect (terminal, ++ "contents-changed", ++ G_CALLBACK (vte_accessible_text_contents_changed), ++ state); ++ g_signal_connect (terminal, ++ "cursor-moved", ++ G_CALLBACK (vte_accessible_text_cursor_moved), ++ state); ++ g_signal_connect (terminal, ++ "selection-changed", ++ G_CALLBACK (vte_accessible_text_selection_changed), ++ state); ++ g_signal_connect (terminal, ++ "window-title-changed", ++ G_CALLBACK (vte_accessible_text_window_title_changed), ++ state); ++ ++ const char *window_title = vte_terminal_get_window_title (terminal); ++ ++ gtk_accessible_update_property (GTK_ACCESSIBLE (accessible), ++ GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, window_title ? window_title : "", ++ GTK_ACCESSIBLE_PROPERTY_HAS_POPUP, TRUE, ++ GTK_ACCESSIBLE_PROPERTY_LABEL, "Terminal", ++ GTK_ACCESSIBLE_PROPERTY_MULTI_LINE, TRUE, ++ GTK_ACCESSIBLE_VALUE_UNDEFINED); ++} +diff --git a/src/vteaccess-gtk4.h b/src/vteaccess-gtk4.h +new file mode 100644 +index 00000000..37b09c7b +--- /dev/null ++++ b/src/vteaccess-gtk4.h +@@ -0,0 +1,25 @@ ++/* ++ * Copyright © 2024 Christian Hergert ++ * ++ * This library is free software: you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License as published ++ * by the Free Software Foundation, either version 3 of the License, or ++ * (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public License ++ * along with this library. If not, see . ++ */ ++ ++#include ++ ++G_BEGIN_DECLS ++ ++void _vte_accessible_text_iface_init (GtkAccessibleTextInterface *iface); ++void _vte_accessible_text_init (GtkAccessibleText *accessible); ++ ++G_END_DECLS +diff --git a/src/vteaccess.cc b/src/vteaccess.cc +index fff918dc..c1c1a4c0 100644 +--- a/src/vteaccess.cc ++++ b/src/vteaccess.cc +@@ -386,6 +386,12 @@ _vte_terminal_accessible_text_modified(VteTerminalAccessible* accessible) + glong offset, caret_offset, olen, clen; + gint old_snapshot_caret; + ++ auto widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(accessible)); ++ auto terminal = VTE_TERMINAL(widget); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ + old_snapshot_caret = priv->snapshot_caret; + priv->snapshot_contents_invalid = TRUE; + vte_terminal_accessible_update_private_data_if_needed(accessible, +@@ -541,6 +547,9 @@ _vte_terminal_accessible_text_scrolled(VteTerminalAccessible* accessible, + auto widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(accessible)); + auto terminal = VTE_TERMINAL(widget); + ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ + row_count = vte_terminal_get_row_count(terminal); + if (((howmuch < 0) && (howmuch <= -row_count)) || + ((howmuch > 0) && (howmuch >= row_count))) { +@@ -793,6 +802,9 @@ vte_terminal_accessible_invalidate_cursor(VteTerminal *terminal, gpointer data) + VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; + VteTerminalAccessiblePrivate *priv = (VteTerminalAccessiblePrivate *)_vte_terminal_accessible_get_instance_private(accessible); + ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ + _vte_debug_print(VTE_DEBUG_ALLY, + "Invalidating accessibility cursor.\n"); + priv->snapshot_caret_invalid = TRUE; +@@ -807,6 +819,9 @@ vte_terminal_accessible_title_changed(VteTerminal *terminal, gpointer data) + { + VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; + ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ + atk_object_set_description(ATK_OBJECT(accessible), vte_terminal_get_window_title(terminal)); + } + +@@ -820,6 +835,9 @@ vte_terminal_accessible_visibility_notify(VteTerminal *terminal, + GtkWidget *widget; + gboolean visible; + ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return FALSE; ++ + visible = event->state != GDK_VISIBILITY_FULLY_OBSCURED; + /* The VISIBLE state indicates that this widget is "visible". */ + atk_object_notify_state_change(ATK_OBJECT(accessible), +@@ -851,6 +869,9 @@ vte_terminal_accessible_selection_changed (VteTerminal *terminal, + { + VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; + ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ + g_signal_emit_by_name (accessible, "text_selection_changed"); + } + +diff --git a/src/vtegtk.cc b/src/vtegtk.cc +index c713a95a..6ece18e9 100644 +--- a/src/vtegtk.cc ++++ b/src/vtegtk.cc +@@ -65,9 +65,11 @@ + #include + + #if WITH_A11Y +-#if VTE_GTK == 3 +-#include "vteaccess.h" +-#endif /* VTE_GTK == 3 */ ++# if VTE_GTK == 3 ++# include "vteaccess.h" ++# elif VTE_GTK == 4 ++# include "vteaccess-gtk4.h" ++# endif + #endif /* WITH_A11Y */ + + #if WITH_ICU +@@ -155,6 +157,14 @@ private: + std::shared_ptr m_widget; + }; + ++#if defined(WITH_A11Y) && VTE_GTK == 4 ++# define VTE_IMPLEMENT_ACCESSIBLE \ ++ G_IMPLEMENT_INTERFACE(GTK_TYPE_ACCESSIBLE_TEXT, \ ++ _vte_accessible_text_iface_init) ++#else ++# define VTE_IMPLEMENT_ACCESSIBLE ++#endif ++ + #if VTE_DEBUG + G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, + { +@@ -163,6 +173,7 @@ G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, + } + g_type_add_class_private (g_define_type_id, sizeof (VteTerminalClassPrivate)); + G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr) ++ VTE_IMPLEMENT_ACCESSIBLE + if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) { + g_printerr("vte_terminal_get_type()\n"); + }) +@@ -173,7 +184,8 @@ G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, + g_type_add_instance_private(g_define_type_id, sizeof(VteTerminalPrivate)); + } + g_type_add_class_private (g_define_type_id, sizeof (VteTerminalClassPrivate)); +- G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr)) ++ G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr) ++ VTE_IMPLEMENT_ACCESSIBLE) + #endif + + static inline auto +@@ -901,6 +913,10 @@ try + gtk_widget_set_has_window(&terminal->widget, FALSE); + #endif + ++#if defined(WITH_A11Y) && VTE_GTK == 4 ++ _vte_accessible_text_init (GTK_ACCESSIBLE_TEXT (terminal)); ++#endif ++ + place = vte_terminal_get_instance_private(terminal); + new (place) VteTerminalPrivate{terminal}; + } +@@ -1017,6 +1033,9 @@ try + case PROP_DELETE_BINDING: + g_value_set_enum (value, widget->delete_binding()); + break; ++ case PROP_ENABLE_A11Y: ++ g_value_set_boolean (value, vte_terminal_get_enable_a11y (terminal)); ++ break; + case PROP_ENABLE_BIDI: + g_value_set_boolean (value, vte_terminal_get_enable_bidi (terminal)); + break; +@@ -1172,6 +1191,9 @@ try + case PROP_DELETE_BINDING: + vte_terminal_set_delete_binding (terminal, (VteEraseBinding)g_value_get_enum (value)); + break; ++ case PROP_ENABLE_A11Y: ++ vte_terminal_set_enable_a11y (terminal, g_value_get_boolean (value)); ++ break; + case PROP_ENABLE_BIDI: + vte_terminal_set_enable_bidi (terminal, g_value_get_boolean (value)); + break; +@@ -2286,6 +2308,22 @@ vte_terminal_class_init(VteTerminalClass *klass) + VTE_ERASE_AUTO, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); + ++ /** ++ * VteTerminal:enable-a11y: ++ * ++ * Controls whether or not a11y is enabled for the widget. ++ * ++ * Since: 0.78 ++ */ ++ pspecs[PROP_ENABLE_A11Y] = ++ g_param_spec_boolean ("enable-a11y", NULL, NULL, ++#if VTE_GTK == 3 ++ TRUE, ++#else ++ FALSE, ++#endif ++ (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); ++ + /** + * VteTerminal:enable-bidi: + * +@@ -2712,10 +2750,12 @@ vte_terminal_class_init(VteTerminalClass *klass) + err.assert_no_error(); + #endif + +-#if VTE_GTK == 3 + #if WITH_A11Y ++#if VTE_GTK == 3 + /* a11y */ + gtk_widget_class_set_accessible_type(widget_class, VTE_TYPE_TERMINAL_ACCESSIBLE); ++#elif VTE_GTK == 4 ++ gtk_widget_class_set_accessible_role(widget_class, GTK_ACCESSIBLE_ROLE_TERMINAL); + #endif + #endif + } +@@ -5709,6 +5749,53 @@ catch (...) + vte::log_exception(); + } + ++/** ++ * vte_terminal_get_enable_a11y: ++ * @terminal: a #VteTerminal ++ * ++ * Checks whether the terminal communicates with a11y backends ++ * ++ * Returns: %TRUE if a11y is enabled, %FALSE if not ++ * ++ * Since: 0.78 ++ */ ++gboolean ++vte_terminal_get_enable_a11y(VteTerminal *terminal) noexcept ++try ++{ ++ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), false); ++ return IMPL(terminal)->m_enable_a11y; ++} ++catch (...) ++{ ++ vte::log_exception(); ++ return false; ++} ++ ++/** ++ * vte_terminal_set_enable_a11y: ++ * @terminal: a #VteTerminal ++ * @enable_a11y: %TRUE to enable a11y support ++ * ++ * Controls whether or not the terminal will communicate with a11y backends. ++ * ++ * Since: 0.78 ++ */ ++void ++vte_terminal_set_enable_a11y(VteTerminal *terminal, ++ gboolean enable_a11y) noexcept ++try ++{ ++ g_return_if_fail(VTE_IS_TERMINAL(terminal)); ++ ++ if (IMPL(terminal)->set_enable_a11y(enable_a11y != FALSE)) ++ g_object_notify_by_pspec(G_OBJECT(terminal), pspecs[PROP_ENABLE_A11Y]); ++} ++catch (...) ++{ ++ vte::log_exception(); ++} ++ + /** + * vte_terminal_get_enable_bidi: + * @terminal: a #VteTerminal +diff --git a/src/vtegtk.hh b/src/vtegtk.hh +index 566c8508..87259680 100644 +--- a/src/vtegtk.hh ++++ b/src/vtegtk.hh +@@ -80,6 +80,7 @@ enum { + PROP_CURRENT_DIRECTORY_URI, + PROP_CURRENT_FILE_URI, + PROP_DELETE_BINDING, ++ PROP_ENABLE_A11Y, + PROP_ENABLE_BIDI, + PROP_ENABLE_FALLBACK_SCROLLING, + PROP_ENABLE_SHAPING, +diff --git a/src/vteinternal.hh b/src/vteinternal.hh +index 07a9e993..6e2c2e7f 100644 +--- a/src/vteinternal.hh ++++ b/src/vteinternal.hh +@@ -799,6 +799,13 @@ public: + const char *m_hyperlink_hover_uri; /* data is owned by the ring */ + long m_hyperlink_auto_id{0}; + ++ /* Accessibility support */ ++#if VTE_GTK == 3 ++ bool m_enable_a11y{true}; ++#elif VTE_GTK == 4 ++ bool m_enable_a11y{false}; ++#endif ++ + /* RingView and friends */ + vte::base::RingView m_ringview; + bool m_enable_bidi{true}; +@@ -1528,6 +1535,7 @@ public: + bool set_cursor_style(CursorStyle style); + bool set_delete_binding(EraseMode binding); + auto delete_binding() const noexcept { return m_delete_binding; } ++ bool set_enable_a11y(bool setting); + bool set_enable_bidi(bool setting); + bool set_enable_shaping(bool setting); + bool set_encoding(char const* codeset, +-- +2.43.1 + diff --git a/0001-add-notification-and-shell-precmd-preexec.patch b/0001-add-notification-and-shell-precmd-preexec.patch new file mode 100644 index 0000000..ffc02b2 --- /dev/null +++ b/0001-add-notification-and-shell-precmd-preexec.patch @@ -0,0 +1,533 @@ +From f31af265a19a406cd193a82b96dff1dd2e4595b4 Mon Sep 17 00:00:00 2001 +From: Christian Hergert +Date: Mon, 4 Mar 2024 14:03:38 -0800 +Subject: [PATCH] add notification and shell precmd/preexec + +This is a bit simpler to manage as a single patch rather than a series of +patches which incrementally update things. + +This alters some of the original patches so that we don't need to have +such careful integration with the vtable of the class as that isn't used. + +You can always connect to the signal rather than the vtable default func. +--- + src/marshal.list | 1 + + src/vte.cc | 28 +++++++++ + src/vte.sh.in | 7 ++- + src/vte/vteterminal.h | 4 ++ + src/vtegtk.cc | 131 ++++++++++++++++++++++++++++++++++++++++++ + src/vtegtk.hh | 5 ++ + src/vteinternal.hh | 26 +++++++++ + src/vteseq.cc | 123 ++++++++++++++++++++++++++++++++++++++- + 8 files changed, 322 insertions(+), 3 deletions(-) + +diff --git a/src/marshal.list b/src/marshal.list +index 241128c3..f9b3818f 100644 +--- a/src/marshal.list ++++ b/src/marshal.list +@@ -1,3 +1,4 @@ + VOID:STRING,BOXED + VOID:STRING,UINT ++VOID:STRING,STRING + VOID:UINT,UINT +diff --git a/src/vte.cc b/src/vte.cc +index 2cba7369..a8a0e22c 100644 +--- a/src/vte.cc ++++ b/src/vte.cc +@@ -10771,6 +10771,34 @@ Terminal::emit_pending_signals() + + emit_adjustment_changed(); + ++ if (m_pending_changes & vte::to_integral(PendingChanges::NOTIFICATION)) { ++ _vte_debug_print (VTE_DEBUG_SIGNALS, ++ "Emitting `notification-received'.\n"); ++ g_signal_emit(freezer.get(), signals[SIGNAL_NOTIFICATION_RECEIVED], 0, ++ m_notification_summary.c_str(), ++ m_notification_body.c_str()); ++ } ++ ++ if (m_pending_changes & vte::to_integral(PendingChanges::SHELL_PREEXEC)) { ++ _vte_debug_print (VTE_DEBUG_SIGNALS, ++ "Emitting `shell-preexec'.\n"); ++ g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); ++ } ++ ++ if (m_pending_changes & vte::to_integral(PendingChanges::SHELL_PRECMD)) { ++ _vte_debug_print (VTE_DEBUG_SIGNALS, ++ "Emitting `shell-precmd'.\n"); ++ g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PRECMD], 0); ++ } ++ ++ if (m_pending_changes & vte::to_integral(PendingChanges::CONTAINERS)) { ++ _vte_debug_print(VTE_DEBUG_SIGNALS, ++ "Notifying `current-container-name' and `current-container-runtime'.\n"); ++ ++ g_object_notify_by_pspec(freezer.get(), pspecs[PROP_CURRENT_CONTAINER_NAME]); ++ g_object_notify_by_pspec(freezer.get(), pspecs[PROP_CURRENT_CONTAINER_RUNTIME]); ++ } ++ + if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { + if (m_window_title != m_window_title_pending) { + m_window_title.swap(m_window_title_pending); +diff --git a/src/vte.sh.in b/src/vte.sh.in +index 2328a9ec..93f45ea8 100644 +--- a/src/vte.sh.in ++++ b/src/vte.sh.in +@@ -28,6 +28,12 @@ case "$TERM" in + *) return 0 ;; + esac + ++__vte_shell_precmd() { ++ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//') ++ command="${command//;/ }" ++ printf '\033]777;notify;Command completed;%s\033\\\033]777;precmd\033\\' "${command}" ++} ++ + __vte_osc7 () { + printf "\033]7;file://%s%s\033\\" "${HOSTNAME}" "$(@libexecdir@/vte-urlencode-cwd)" + } +@@ -37,6 +43,7 @@ __vte_prompt_command() { + [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} + pwd="${pwd//[[:cntrl:]]}" + printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${pwd}" ++ __vte_shell_precmd + __vte_osc7 + } + +@@ -49,9 +56,12 @@ if [[ -n "${BASH_VERSION:-}" ]]; then + # use the __vte_prompt_command function which also sets the title. + + if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then ++ PROMPT_COMMAND+=(__vte_shell_precmd) + PROMPT_COMMAND+=(__vte_osc7) ++ PS0=$(printf "\033]777;preexec\033\\") + else + PROMPT_COMMAND="__vte_prompt_command" ++ PS0=$(printf "\033]777;preexec\033\\") + fi + + # Shell integration +diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h +index a9e1e494..9c2e2dae 100644 +--- a/src/vte/vteterminal.h ++++ b/src/vte/vteterminal.h +@@ -559,6 +559,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT + _VTE_PUBLIC + const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); + _VTE_PUBLIC ++const char *vte_terminal_get_current_container_name(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); ++_VTE_PUBLIC ++const char *vte_terminal_get_current_container_runtime(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); ++_VTE_PUBLIC + const char *vte_terminal_get_current_directory_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); + _VTE_PUBLIC + const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); +diff --git a/src/vtegtk.cc b/src/vtegtk.cc +index 92eb6881..c713a95a 100644 +--- a/src/vtegtk.cc ++++ b/src/vtegtk.cc +@@ -999,6 +999,12 @@ try + case PROP_CURSOR_BLINK_MODE: + g_value_set_enum (value, vte_terminal_get_cursor_blink_mode (terminal)); + break; ++ case PROP_CURRENT_CONTAINER_NAME: ++ g_value_set_string (value, vte_terminal_get_current_container_name (terminal)); ++ break; ++ case PROP_CURRENT_CONTAINER_RUNTIME: ++ g_value_set_string (value, vte_terminal_get_current_container_runtime (terminal)); ++ break; + case PROP_CURRENT_DIRECTORY_URI: + g_value_set_string (value, vte_terminal_get_current_directory_uri (terminal)); + break; +@@ -1434,6 +1440,60 @@ vte_terminal_class_init(VteTerminalClass *klass) + G_OBJECT_CLASS_TYPE(klass), + g_cclosure_marshal_VOID__INTv); + ++ /** ++ * VteTerminal::notification-received: ++ * @vteterminal: the object which received the signal ++ * @summary: The summary ++ * @body: (allow-none): Extra optional text ++ * ++ * Emitted when a process running in the terminal wants to ++ * send a notification to the desktop environment. ++ */ ++ signals[SIGNAL_NOTIFICATION_RECEIVED] = ++ g_signal_new(I_("notification-received"), ++ G_OBJECT_CLASS_TYPE(klass), ++ G_SIGNAL_RUN_LAST, ++ 0, ++ NULL, ++ NULL, ++ _vte_marshal_VOID__STRING_STRING, ++ G_TYPE_NONE, ++ 2, G_TYPE_STRING, G_TYPE_STRING); ++ ++ /** ++ * VteTerminal::shell-precmd: ++ * @vteterminal: the object which received the signal ++ * ++ * Emitted right before an interactive shell shows a ++ * first-level prompt. ++ */ ++ signals[SIGNAL_SHELL_PRECMD] = ++ g_signal_new(I_("shell-precmd"), ++ G_OBJECT_CLASS_TYPE(klass), ++ G_SIGNAL_RUN_LAST, ++ 0, ++ NULL, ++ NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ ++ /** ++ * VteTerminal::shell-preexec: ++ * @vteterminal: the object which received the signal ++ * ++ * Emitted when the interactive shell has read in a complete ++ * command and is about to execute it. ++ */ ++ signals[SIGNAL_SHELL_PREEXEC] = ++ g_signal_new(I_("shell-preexec"), ++ G_OBJECT_CLASS_TYPE(klass), ++ G_SIGNAL_RUN_LAST, ++ 0, ++ NULL, ++ NULL, ++ g_cclosure_marshal_VOID__VOID, ++ G_TYPE_NONE, 0); ++ + /** + * VteTerminal::window-title-changed: + * @vteterminal: the object which received the signal +@@ -2487,6 +2547,27 @@ vte_terminal_class_init(VteTerminalClass *klass) + NULL, + (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); + ++ /** ++ * VteTerminal:current-container-name: ++ * ++ * The name of the current container, or %NULL if unset. ++ */ ++ pspecs[PROP_CURRENT_CONTAINER_NAME] = ++ g_param_spec_string ("current-container-name", NULL, NULL, ++ NULL, ++ (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); ++ ++ /** ++ * VteTerminal:current-container-runtime: ++ * ++ * The name of the runtime toolset used to set up the current ++ * container, or %NULL if unset. ++ */ ++ pspecs[PROP_CURRENT_CONTAINER_RUNTIME] = ++ g_param_spec_string ("current-container-runtime", NULL, NULL, ++ NULL, ++ (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); ++ + /** + * VteTerminal:current-directory-uri: + * +@@ -5419,6 +5500,56 @@ catch (...) + return -1; + } + ++/** ++ * vte_terminal_get_current_container_name: ++ * @terminal: a #VteTerminal ++ * ++ * Returns: (nullable) (transfer none): the name of the current ++ * container, or %NULL ++ */ ++const char * ++vte_terminal_get_current_container_name(VteTerminal *terminal) noexcept ++try ++{ ++ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL); ++ auto impl = IMPL(terminal); ++ if (impl->m_containers.empty()) ++ return NULL; ++ ++ const VteContainer &container = impl->m_containers.top(); ++ return container.m_name.c_str(); ++} ++catch (...) ++{ ++ vte::log_exception(); ++ return NULL; ++} ++ ++/** ++ * vte_terminal_get_current_container_runtime: ++ * @terminal: a #VteTerminal ++ * ++ * Returns: (nullable) (transfer none): the name of the runtime ++ * toolset used to set up the current container, or %NULL ++ */ ++const char * ++vte_terminal_get_current_container_runtime(VteTerminal *terminal) noexcept ++try ++{ ++ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL); ++ auto impl = IMPL(terminal); ++ if (impl->m_containers.empty()) ++ return NULL; ++ ++ const VteContainer &container = impl->m_containers.top(); ++ return container.m_runtime.c_str(); ++} ++catch (...) ++{ ++ vte::log_exception(); ++ return NULL; ++} ++ + /** + * vte_terminal_get_current_directory_uri: + * @terminal: a #VteTerminal +diff --git a/src/vtegtk.hh b/src/vtegtk.hh +index 1d1383af..566c8508 100644 +--- a/src/vtegtk.hh ++++ b/src/vtegtk.hh +@@ -53,6 +53,9 @@ enum { + SIGNAL_RESTORE_WINDOW, + SIGNAL_SELECTION_CHANGED, + SIGNAL_SETUP_CONTEXT_MENU, ++ SIGNAL_SHELL_PRECMD, ++ SIGNAL_SHELL_PREEXEC, ++ SIGNAL_NOTIFICATION_RECEIVED, + SIGNAL_WINDOW_TITLE_CHANGED, + LAST_SIGNAL + }; +@@ -72,6 +75,8 @@ enum { + PROP_CONTEXT_MENU, + PROP_CURSOR_BLINK_MODE, + PROP_CURSOR_SHAPE, ++ PROP_CURRENT_CONTAINER_NAME, ++ PROP_CURRENT_CONTAINER_RUNTIME, + PROP_CURRENT_DIRECTORY_URI, + PROP_CURRENT_FILE_URI, + PROP_DELETE_BINDING, +diff --git a/src/vteinternal.hh b/src/vteinternal.hh +index ed57ad16..07a9e993 100644 +--- a/src/vteinternal.hh ++++ b/src/vteinternal.hh +@@ -63,6 +63,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -121,6 +122,18 @@ typedef enum _VteCharacterReplacement { + VTE_CHARACTER_REPLACEMENT_LINE_DRAWING + } VteCharacterReplacement; + ++struct VteContainer { ++public: ++ VteContainer(const std::string &name, const std::string &runtime) : ++ m_name{name}, ++ m_runtime{runtime} ++ { ++ } ++ ++ std::string m_name; ++ std::string m_runtime; ++}; ++ + typedef struct _VtePaletteColor { + struct { + vte::color::rgb color; +@@ -710,6 +723,12 @@ public: + gboolean m_cursor_moved_pending; + gboolean m_contents_changed_pending; + ++ /* desktop notification */ ++ std::stack m_containers; ++ ++ std::string m_notification_summary; ++ std::string m_notification_body; ++ + std::string m_window_title{}; + std::string m_current_directory_uri{}; + std::string m_current_file_uri{}; +@@ -723,6 +742,10 @@ public: + TITLE = 1u << 0, + CWD = 1u << 1, + CWF = 1u << 2, ++ NOTIFICATION = 1u << 4, ++ SHELL_PREEXEC = 1u << 5, ++ SHELL_PRECMD = 1u << 6, ++ CONTAINERS = 1u << 7, + }; + unsigned m_pending_changes{0}; + +@@ -1654,6 +1677,9 @@ public: + int osc) noexcept; + + /* OSC handlers */ ++ void handle_urxvt_extension(vte::parser::Sequence const& seq, ++ vte::parser::StringTokeniser::const_iterator& token, ++ vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept; + void set_color(vte::parser::Sequence const& seq, + vte::parser::StringTokeniser::const_iterator& token, + vte::parser::StringTokeniser::const_iterator const& endtoken, +diff --git a/src/vteseq.cc b/src/vteseq.cc +index 904837e1..26f7b0d6 100644 +--- a/src/vteseq.cc ++++ b/src/vteseq.cc +@@ -39,6 +39,9 @@ + #define ST_C0 _VTE_CAP_ST + + #include ++#include ++#include ++#include + + using namespace std::literals; + +@@ -1276,6 +1279,121 @@ Terminal::erase_in_line(vte::parser::Sequence const& seq) + m_text_deleted_flag = TRUE; + } + ++void ++Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, ++ vte::parser::StringTokeniser::const_iterator& token, ++ vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept ++{ ++ if (token == endtoken) ++ return; ++ ++ if (*token == "container") { ++ ++token; ++ ++ if (token == endtoken) ++ return; ++ ++ const std::string sub_command = *token; ++ ++token; ++ ++ if (sub_command == "pop") { ++ if (token == endtoken) ++ return; ++ ++ ++token; ++ ++ if (token == endtoken) ++ return; ++ ++ ++token; ++ ++ if (token == endtoken) { ++ if (!m_containers.empty()) { ++ m_containers.pop(); ++ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); ++ } ++ ++ return; ++ } ++ ++ const std::string uid_token = *token; ++ ++token; ++ ++ const uid_t uid = getuid(); ++ const std::string uid_str = std::to_string(uid); ++ ++ if (uid_token == uid_str) { ++ if (!m_containers.empty()) { ++ m_containers.pop(); ++ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); ++ } ++ ++ return; ++ } ++ ++ return; ++ } else if (sub_command == "push") { ++ if (token == endtoken) ++ return; ++ ++ const std::string name = *token; ++ ++token; ++ ++ if (token == endtoken) ++ return; ++ ++ const std::string runtime = *token; ++ ++token; ++ ++ if (token == endtoken) { ++ m_containers.emplace(name, runtime); ++ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); ++ return; ++ } ++ ++ const std::string uid_token = *token; ++ ++token; ++ ++ const uid_t uid = getuid(); ++ const std::string uid_str = std::to_string(uid); ++ ++ if (uid_token == uid_str) { ++ m_containers.emplace(name, runtime); ++ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); ++ return; ++ } ++ ++ return; ++ } ++ ++ return; ++ } ++ ++ if (*token == "notify") { ++ ++token; ++ ++ if (token == endtoken) ++ return; ++ ++ m_notification_summary = *token; ++ m_notification_body.clear(); ++ m_pending_changes |= vte::to_integral(PendingChanges::NOTIFICATION); ++ ++token; ++ ++ if (token == endtoken) ++ return; ++ ++ m_notification_body = *token; ++ return; ++ } ++ ++ if (*token == "precmd") { ++ m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PRECMD); ++ } else if (*token == "preexec") { ++ m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PREEXEC); ++ } ++} ++ + bool + Terminal::get_osc_color_index(int osc, + int value, +@@ -6596,6 +6714,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) + reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE); + break; + ++ case VTE_OSC_URXVT_EXTENSION: ++ handle_urxvt_extension(seq, it, cend); ++ break; ++ + case VTE_OSC_XTERM_SET_ICON_TITLE: + case VTE_OSC_XTERM_SET_XPROPERTY: + case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG: +@@ -6636,7 +6758,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) + case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC: + case VTE_OSC_URXVT_VIEW_UP: + case VTE_OSC_URXVT_VIEW_DOWN: +- case VTE_OSC_URXVT_EXTENSION: + case VTE_OSC_YF_RQGWR: + default: + break; +-- +2.43.1 + diff --git a/vte291-cntnr-precmd-preexec-scroll.patch b/vte291-cntnr-precmd-preexec-scroll.patch deleted file mode 100644 index 32ac71e..0000000 --- a/vte291-cntnr-precmd-preexec-scroll.patch +++ /dev/null @@ -1,2727 +0,0 @@ -From aace6f9a1f217be6496a3df0833bf1cd9841bf24 Mon Sep 17 00:00:00 2001 -From: Christian Hergert -Date: Tue, 2 Apr 2024 11:25:40 +0100 -Subject: [PATCH 01/12] a11y: implement GtkAccessibleText - -This is an initial implementaiton of GtkAccessibleText which was added -to GTK for 4.14. It attempts to implement things in a very similar -fashion to the previous code for GTK 3 although considerable effort was -made to simplify and improve readability as to how it works. - -Currently, this supports reading back what you type and what has changed -on screen. It is not yet 1:1 what the GTK 3 a11y implementation did -because ATK was doing many other things (including proxying keyboard -keys) to the other side of the a11y bus. That appears to improve -readback by screen readers in the form of "backspace" and what character -was deleted. - -I expect things to get closer to 1:1 but that work is going to have to -be done inside of GTK itself first and should not require much if -anything here. - -A new VteTerminal:enable-a11y feature flag property has been added -because I'm concerned about enabling this by default until the a11y bus -learns to be more lazy. Currently there is no way to "do nothing" until -a peer (e.g. screenreader) is interested in the contents. - -Ideally, we would have a short-circuit like is currently implemented by -checking vte_terminal_get_enable_a11y() to avoid any sort of contents -calculation when there are no a11y observers. - -It also allows disabling the GTK 3 a11y implementation just to keep some -symmetry between the APIs. - -Currently, this does not implement "text-scrolled" like the GTK 3 -implementation does as I'm not sure yet if there is a benefit. ---- - src/meson.build | 13 +- - src/vte.cc | 11 + - src/vte/vteterminal.h | 7 + - src/vteaccess-gtk4.cc | 874 ++++++++++++++++++++++++++++++++++++++++++ - src/vteaccess-gtk4.h | 25 ++ - src/vteaccess.cc | 21 + - src/vtegtk.cc | 97 ++++- - src/vtegtk.hh | 1 + - src/vteinternal.hh | 8 + - 9 files changed, 1050 insertions(+), 7 deletions(-) - create mode 100644 src/vteaccess-gtk4.cc - create mode 100644 src/vteaccess-gtk4.h - -diff --git a/src/meson.build b/src/meson.build -index 3f89f492..6d1b4b2b 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -18,11 +18,16 @@ subdir('vte') - - src_inc = include_directories('.') - --a11y_sources = files( -+a11y_gtk3_sources = files( - 'vteaccess.cc', - 'vteaccess.h', - ) - -+a11y_gtk4_sources = files( -+ 'vteaccess-gtk4.cc', -+ 'vteaccess-gtk4.h', -+) -+ - debug_sources = files( - 'debug.cc', - 'debug.h', -@@ -300,7 +305,7 @@ if get_option('gtk3') - libvte_gtk3_public_deps = libvte_common_public_deps + [gtk3_dep,] - - if get_option('a11y') -- libvte_gtk3_sources += a11y_sources -+ libvte_gtk3_sources += a11y_gtk3_sources - endif - - libvte_gtk3 = shared_library( -@@ -349,6 +354,10 @@ if get_option('gtk4') - libvte_gtk4_deps = libvte_common_deps + [gtk4_dep,] - libvte_gtk4_public_deps = libvte_common_public_deps + [gtk4_dep,] - -+ if get_option('a11y') -+ libvte_gtk4_sources += a11y_gtk4_sources -+ endif -+ - libvte_gtk4 = shared_library( - vte_gtk4_api_name, - sources: libvte_gtk4_sources, -diff --git a/src/vte.cc b/src/vte.cc -index b3bcc0a6..6f5ed505 100644 ---- a/src/vte.cc -+++ b/src/vte.cc -@@ -10134,6 +10134,17 @@ Terminal::set_text_blink_mode(TextBlinkMode setting) - return true; - } - -+bool -+Terminal::set_enable_a11y(bool setting) -+{ -+ if (setting == m_enable_a11y) -+ return false; -+ -+ m_enable_a11y = setting; -+ -+ return true; -+} -+ - bool - Terminal::set_enable_bidi(bool setting) - { -diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index a9e1e494..33360909 100644 ---- a/src/vte/vteterminal.h -+++ b/src/vte/vteterminal.h -@@ -388,6 +388,13 @@ _VTE_PUBLIC - void vte_terminal_set_delete_binding(VteTerminal *terminal, - VteEraseBinding binding) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); - -+/* Accessibility */ -+_VTE_PUBLIC -+void vte_terminal_set_enable_a11y(VteTerminal *terminal, -+ gboolean enable_a11y) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+_VTE_PUBLIC -+gboolean vte_terminal_get_enable_a11y(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+ - /* BiDi and shaping */ - _VTE_PUBLIC - void vte_terminal_set_enable_bidi(VteTerminal *terminal, -diff --git a/src/vteaccess-gtk4.cc b/src/vteaccess-gtk4.cc -new file mode 100644 -index 00000000..f42e7578 ---- /dev/null -+++ b/src/vteaccess-gtk4.cc -@@ -0,0 +1,874 @@ -+/* -+ * Copyright © 2024 Christian Hergert -+ * Copyright © 2002,2003 Red Hat, Inc. -+ * -+ * This library is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU Lesser General Public License as published -+ * by the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public License -+ * along with this library. If not, see . -+ */ -+ -+#include "config.h" -+ -+#include "vteinternal.hh" -+#include "vteaccess-gtk4.h" -+ -+#define GDK_ARRAY_NAME char_positions -+#define GDK_ARRAY_TYPE_NAME CharPositions -+#define GDK_ARRAY_ELEMENT_TYPE int -+#define GDK_ARRAY_BY_VALUE 1 -+#define GDK_ARRAY_PREALLOC 8 -+#define GDK_ARRAY_NO_MEMSET -+#include "gdkarrayimpl.c" -+ -+typedef struct _VteAccessibleTextContents -+{ -+ /* A GdkArrayImpl of attributes per byte */ -+ VteCharAttrList attrs; -+ -+ /* The byte position within the UTF-8 string where each visible -+ * character starts. -+ */ -+ CharPositions characters; -+ -+ /* The character position within the UTF-8 string where each line -+ * break occurs. To get byte offset, use @characters. -+ */ -+ CharPositions linebreaks; -+ -+ /* The UTF-8 string encoded as bytes so that we may reference it -+ * using GBytes for "substrings". However @string does include a -+ * trailing NUL byte in it's size so that the a11y infrastructure -+ * may elide some string copies. -+ */ -+ GBytes *string; -+ -+ /* Number of bytes in @string excluding trailing NUL. */ -+ gsize n_bytes; -+ -+ /* Number of unicode characters in @string. */ -+ gsize n_chars; -+ -+ /* The character position (not bytes) of the caret in @string */ -+ gsize caret; -+ -+ /* Cached column/row of the caret updated each time we are notified -+ * of the caret having moved. We cache this so that we can elide -+ * extraneous notifications after snapshoting. We will update the -+ * carent position synchronously when notified so @caret may always -+ * be relied upon as correct. -+ */ -+ long cached_caret_column; -+ long cached_caret_row; -+} VteAccessibleTextContents; -+ -+typedef struct _VteAccessibleText -+{ -+ VteTerminal *terminal; -+ VteAccessibleTextContents contents[2]; -+ guint contents_flip : 1; -+} VteAccessibleText; -+ -+static inline gboolean -+_pango_color_equal(const PangoColor *a, -+ const PangoColor *b) -+{ -+ return a->red == b->red && -+ a->green == b->green && -+ a->blue == b->blue; -+} -+ -+static void -+vte_accessible_text_contents_init (VteAccessibleTextContents *contents) -+{ -+ vte_char_attr_list_init (&contents->attrs); -+ char_positions_init (&contents->characters); -+ char_positions_init (&contents->linebreaks); -+ contents->string = nullptr; -+ contents->n_bytes = 0; -+ contents->n_chars = 0; -+ contents->caret = 0; -+ contents->cached_caret_row = 0; -+ contents->cached_caret_column = 0; -+} -+ -+static void -+vte_accessible_text_contents_clear (VteAccessibleTextContents *contents) -+{ -+ vte_char_attr_list_clear (&contents->attrs); -+ char_positions_clear (&contents->characters); -+ char_positions_clear (&contents->linebreaks); -+ g_clear_pointer (&contents->string, g_bytes_unref); -+ contents->n_bytes = 0; -+ contents->n_chars = 0; -+ contents->caret = 0; -+ contents->cached_caret_row = 0; -+ contents->cached_caret_column = 0; -+} -+ -+static void -+vte_accessible_text_contents_reset (VteAccessibleTextContents *contents) -+{ -+ vte_char_attr_list_set_size (&contents->attrs, 0); -+ char_positions_set_size (&contents->characters, 0); -+ char_positions_set_size (&contents->linebreaks, 0); -+ g_clear_pointer (&contents->string, g_bytes_unref); -+ contents->n_bytes = 0; -+ contents->n_chars = 0; -+ contents->caret = 0; -+ contents->cached_caret_row = 0; -+ contents->cached_caret_column = 0; -+} -+ -+static const char * -+vte_accessible_text_contents_get_string (VteAccessibleTextContents *contents, -+ gsize *len) -+{ -+ const char *ret; -+ -+ if (contents->string == nullptr || g_bytes_get_size (contents->string) == 0) { -+ *len = 0; -+ return ""; -+ } -+ -+ ret = (const char *)g_bytes_get_data (contents->string, len); -+ -+ if (*len > 0) { -+ (*len)--; -+ } -+ -+ return ret; -+} -+ -+static int -+vte_accessible_text_contents_offset_from_xy (VteAccessibleTextContents *contents, -+ int x, -+ int y) -+{ -+ int offset; -+ int linebreak; -+ int next_linebreak; -+ -+ if (y >= int(char_positions_get_size (&contents->linebreaks))) { -+ y = int(char_positions_get_size (&contents->linebreaks)) - 1; -+ if (y < 0) { -+ return 0; -+ } -+ } -+ -+ linebreak = *char_positions_index (&contents->linebreaks, y); -+ if (y + 1 == int(char_positions_get_size (&contents->linebreaks))) { -+ next_linebreak = int(char_positions_get_size (&contents->characters)); -+ } else { -+ next_linebreak = *char_positions_index (&contents->linebreaks, y + 1); -+ } -+ -+ offset = linebreak + x; -+ if (offset >= next_linebreak) { -+ offset = next_linebreak - 1; -+ } -+ -+ return offset; -+} -+ -+static gunichar -+vte_accessible_text_contents_get_char_at (VteAccessibleTextContents *contents, -+ guint offset) -+{ -+ const char *str; -+ -+ if (contents->string == nullptr) -+ return 0; -+ -+ if (offset >= contents->n_chars) -+ return 0; -+ -+ g_assert (offset < char_positions_get_size (&contents->characters)); -+ -+ str = (const char *)g_bytes_get_data (contents->string, nullptr); -+ str += *char_positions_index (&contents->characters, offset); -+ -+ return g_utf8_get_char (str); -+ -+} -+ -+static GBytes * -+_g_string_free_to_bytes_with_nul (GString *str) -+{ -+ /* g_string_free_to_bytes() will have a trailing-NUL but not include it -+ * in the size of the GBytes. We want the size included in our GBytes -+ * so that GtkAccessibleText may avoid some copies. -+ */ -+ gsize len = str->len + 1; -+ return g_bytes_new_take (g_string_free (str, FALSE), len); -+} -+ -+static inline gsize -+vte_accessible_text_contents_find_caret (VteAccessibleTextContents *contents, -+ long ccol, -+ long crow) -+{ -+ g_assert (contents != nullptr); -+ -+ /* Get the offsets to the beginnings of each line. */ -+ gsize caret = 0; -+ for (gsize i = 0; i < char_positions_get_size (&contents->characters); i++) { -+ /* Get the attributes for the current cell. */ -+ int offset = *char_positions_index (&contents->characters, i); -+ const struct _VteCharAttributes *attrs = vte_char_attr_list_get (&contents->attrs, offset); -+ -+ /* If this cell is "before" the cursor, move the caret to be "here". */ -+ if ((attrs->row < crow) || -+ ((attrs->row == crow) && (attrs->column < ccol))) { -+ caret = i + 1; -+ } -+ } -+ -+ return caret; -+} -+ -+static void -+vte_accessible_text_contents_snapshot (VteAccessibleTextContents *contents, -+ VteTerminal *terminal) -+{ -+ auto impl = _vte_terminal_get_impl (terminal); -+ GString *gstr = g_string_new (nullptr); -+ -+ try { -+ impl->get_text_displayed_a11y (gstr, &contents->attrs); -+ } catch (...) { -+ g_string_truncate (gstr, 0); -+ } -+ -+ if (vte_char_attr_list_get_size (&contents->attrs) >= G_MAXINT) { -+ g_string_truncate (gstr, 0); -+ return; -+ } -+ -+ /* Get the offsets to the beginnings of each character. */ -+ int i = 0; -+ const char *next = gstr->str; -+ int n_attrs = int(vte_char_attr_list_get_size (&contents->attrs)); -+ while (i < n_attrs) { -+ char_positions_append (&contents->characters, &i); -+ next = g_utf8_next_char (next); -+ if (next != nullptr) { -+ i = next - gstr->str; -+ continue; -+ } -+ break; -+ } -+ -+ /* Find offsets for the beginning of lines. */ -+ gsize n_chars = char_positions_get_size (&contents->characters); -+ int row; -+ for (i = 0, row = 0; i < int(n_chars); i++) { -+ /* Get the attributes for the current cell. */ -+ int offset = *char_positions_index (&contents->characters, i); -+ const struct _VteCharAttributes *attrs = vte_char_attr_list_get (&contents->attrs, offset); -+ -+ /* If this character is on a row different from the row -+ * the character we looked at previously was on, then -+ * it's a new line and we need to keep track of where -+ * it is. */ -+ if ((i == 0) || (attrs->row != row)) { -+ _vte_debug_print (VTE_DEBUG_ALLY, -+ "Row %d/%ld begins at %d.\n", -+ int(char_positions_get_size (&contents->linebreaks)), -+ attrs->row, i); -+ char_positions_append (&contents->linebreaks, &i); -+ } -+ -+ row = attrs->row; -+ } -+ -+ /* Add the final line break. */ -+ char_positions_append (&contents->linebreaks, &i); -+ -+ /* Update the caret position. */ -+ long ccol, crow; -+ vte_terminal_get_cursor_position (terminal, &ccol, &crow); -+ _vte_debug_print (VTE_DEBUG_ALLY, "Cursor at (%ld, " "%ld).\n", ccol, crow); -+ gsize caret = vte_accessible_text_contents_find_caret (contents, ccol, crow); -+ -+ contents->n_bytes = gstr->len; -+ contents->n_chars = n_chars; -+ contents->string = _g_string_free_to_bytes_with_nul (gstr); -+ contents->caret = caret; -+ contents->cached_caret_column = ccol; -+ contents->cached_caret_row = crow; -+ -+ _vte_debug_print (VTE_DEBUG_ALLY, -+ "Refreshed accessibility snapshot, " -+ "%ld cells, %ld characters.\n", -+ long(vte_char_attr_list_get_size(&contents->attrs)), -+ long(char_positions_get_size (&contents->characters))); -+} -+ -+static GBytes * -+vte_accessible_text_contents_slice (VteAccessibleTextContents *contents, -+ guint start, -+ guint end) -+{ -+ static const char empty[] = {0}; -+ guint start_offset; -+ guint end_offset; -+ -+ g_assert (contents != nullptr); -+ -+ if (contents->string == nullptr) -+ return g_bytes_new_static (empty, sizeof empty); -+ -+ if (start > contents->n_chars) -+ start = contents->n_chars; -+ -+ if (end > contents->n_chars) -+ end = contents->n_chars; -+ -+ if (end < start) -+ std::swap (end, start); -+ -+ g_assert (start <= char_positions_get_size (&contents->characters)); -+ g_assert (end <= char_positions_get_size (&contents->characters)); -+ -+ if (start == char_positions_get_size (&contents->characters)) -+ start_offset = g_bytes_get_size (contents->string); -+ else -+ start_offset = *char_positions_index (&contents->characters, start); -+ -+ if (end == char_positions_get_size (&contents->characters)) -+ end_offset = g_bytes_get_size (contents->string); -+ else -+ end_offset = *char_positions_index (&contents->characters, end); -+ -+ g_assert (start_offset <= end_offset); -+ -+ if (start_offset == end_offset) -+ return g_bytes_new_static (empty, sizeof empty); -+ -+ return g_bytes_new_from_bytes (contents->string, start_offset, end_offset - start_offset); -+} -+ -+static void -+vte_accessible_text_free (VteAccessibleText *state) -+{ -+ vte_accessible_text_contents_clear (&state->contents[0]); -+ vte_accessible_text_contents_clear (&state->contents[1]); -+ state->terminal = nullptr; -+ g_free (state); -+} -+ -+static VteAccessibleText * -+vte_accessible_text_get (VteTerminal *terminal) -+{ -+ return (VteAccessibleText *)g_object_get_data (G_OBJECT (terminal), "VTE_ACCESSIBLE_TEXT"); -+} -+ -+static GBytes * -+vte_accessible_text_get_contents (GtkAccessibleText *accessible, -+ guint start, -+ guint end) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ VteAccessibleTextContents *contents = nullptr; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ contents = &state->contents[state->contents_flip]; -+ -+ return vte_accessible_text_contents_slice (contents, start, end); -+} -+ -+static GBytes * -+vte_accessible_text_get_contents_at (GtkAccessibleText *accessible, -+ guint offset, -+ GtkAccessibleTextGranularity granularity, -+ guint *start, -+ guint *end) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ VteAccessibleTextContents *contents; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ auto impl = _vte_terminal_get_impl (terminal); -+ -+ contents = &state->contents[state->contents_flip]; -+ -+ if (contents->string == nullptr) { -+ return nullptr; -+ } -+ -+ if (offset > contents->n_chars) { -+ offset = contents->n_chars; -+ } -+ -+ switch (granularity) { -+ case GTK_ACCESSIBLE_TEXT_GRANULARITY_CHARACTER: { -+ *start = offset; -+ *end = offset + 1; -+ return vte_accessible_text_contents_slice (contents, offset, offset + 1); -+ } -+ -+ case GTK_ACCESSIBLE_TEXT_GRANULARITY_LINE: { -+ guint char_offset = *char_positions_index (&contents->characters, offset); -+ guint line; -+ -+ for (line = 0; -+ line < char_positions_get_size (&contents->linebreaks); -+ line++) { -+ guint line_offset = *char_positions_index (&contents->linebreaks, line); -+ -+ if (line_offset > char_offset) { -+ line--; -+ break; -+ } -+ } -+ -+ _vte_debug_print (VTE_DEBUG_ALLY, -+ "Character %u is on line %u.\n", -+ offset, line); -+ -+ *start = *char_positions_index (&contents->linebreaks, line); -+ if (line + 1 < char_positions_get_size (&contents->linebreaks)) -+ *end = *char_positions_index (&contents->linebreaks, line + 1); -+ else -+ *end = contents->n_chars; -+ -+ return vte_accessible_text_contents_slice (contents, *start, *end); -+ } -+ -+ case GTK_ACCESSIBLE_TEXT_GRANULARITY_WORD: { -+ gunichar ch = vte_accessible_text_contents_get_char_at (contents, offset); -+ -+ if (ch == 0 || !impl->is_word_char (ch)) -+ break; -+ -+ *start = offset; -+ *end = offset; -+ -+ while (*start > 0 && -+ (ch = vte_accessible_text_contents_get_char_at (contents, *start - 1)) && -+ impl->is_word_char (ch)) { -+ (*start)--; -+ } -+ -+ while (*end < contents->n_chars && -+ (ch = vte_accessible_text_contents_get_char_at (contents, *end + 1)) && -+ impl->is_word_char (ch)) { -+ (*end)++; -+ } -+ -+ return vte_accessible_text_contents_slice (contents, *start, *end); -+ } -+ -+ case GTK_ACCESSIBLE_TEXT_GRANULARITY_SENTENCE: -+ case GTK_ACCESSIBLE_TEXT_GRANULARITY_PARAGRAPH: -+ default: -+ break; -+ } -+ -+ return nullptr; -+} -+ -+static guint -+vte_accessible_text_get_caret_position (GtkAccessibleText *accessible) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ -+ g_assert (VTE_IS_TERMINAL (accessible)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ return state->contents[state->contents_flip].caret; -+} -+ -+static gboolean -+vte_accessible_text_get_selection (GtkAccessibleText *accessible, -+ gsize *n_ranges, -+ GtkAccessibleTextRange **ranges) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (ranges != nullptr); -+ -+ *n_ranges = 0; -+ *ranges = nullptr; -+ -+ try { -+ auto impl = _vte_terminal_get_impl (terminal); -+ VteAccessibleTextContents *contents = &state->contents[state->contents_flip]; -+ GtkAccessibleTextRange range; -+ -+ if (impl->m_selection_resolved.empty() || -+ impl->m_selection[vte::to_integral(vte::platform::ClipboardType::PRIMARY)] == nullptr) -+ return FALSE; -+ -+ auto start_column = impl->m_selection_resolved.start_column(); -+ auto start_row = impl->m_selection_resolved.start_row(); -+ auto end_column = impl->m_selection_resolved.end_column(); -+ auto end_row = impl->m_selection_resolved.end_row(); -+ -+ auto start_offset = vte_accessible_text_contents_offset_from_xy (contents, start_column, start_row); -+ auto end_offset = vte_accessible_text_contents_offset_from_xy (contents, end_column, end_row); -+ -+ range.start = gsize(start_offset); -+ range.length = gsize(end_offset - start_offset); -+ -+ *n_ranges = 1; -+ *ranges = (GtkAccessibleTextRange *)g_memdup2 (&range, sizeof range); -+ -+ return TRUE; -+ } catch (...) { } -+ -+ return FALSE; -+} -+ -+static gboolean -+vte_accessible_text_get_attributes (GtkAccessibleText *accessible, -+ guint offset, -+ gsize *n_ranges, -+ GtkAccessibleTextRange **ranges, -+ char ***attribute_names, -+ char ***attribute_values) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ VteAccessibleTextContents *contents; -+ struct _VteCharAttributes cur_attr; -+ struct _VteCharAttributes attr; -+ GtkAccessibleTextRange range; -+ struct { -+ const char *name; -+ const char *value; -+ } attrs[4]; -+ char fg_color[16]; -+ char bg_color[16]; -+ guint n_attrs = 0; -+ guint start = 0; -+ guint end = 0; -+ guint i; -+ -+ g_assert (VTE_IS_TERMINAL (accessible)); -+ g_assert (ranges != nullptr); -+ g_assert (attribute_names != nullptr); -+ g_assert (attribute_values != nullptr); -+ -+ contents = &state->contents[state->contents_flip]; -+ -+ *n_ranges = 0; -+ *ranges = nullptr; -+ *attribute_names = nullptr; -+ *attribute_values = nullptr; -+ -+ attr = *vte_char_attr_list_get (&contents->attrs, offset); -+ start = 0; -+ for (i = offset; i--;) { -+ cur_attr = *vte_char_attr_list_get (&contents->attrs, i); -+ if (!_pango_color_equal (&cur_attr.fore, &attr.fore) || -+ !_pango_color_equal (&cur_attr.back, &attr.back) || -+ cur_attr.underline != attr.underline || -+ cur_attr.strikethrough != attr.strikethrough) { -+ start = i + 1; -+ break; -+ } -+ } -+ end = vte_char_attr_list_get_size (&contents->attrs) - 1; -+ for (i = offset + 1; i < vte_char_attr_list_get_size (&contents->attrs); i++) { -+ cur_attr = *vte_char_attr_list_get (&contents->attrs, i); -+ if (!_pango_color_equal (&cur_attr.fore, &attr.fore) || -+ !_pango_color_equal (&cur_attr.back, &attr.back) || -+ cur_attr.underline != attr.underline || -+ cur_attr.strikethrough != attr.strikethrough) { -+ end = i - 1; -+ break; -+ } -+ } -+ -+ range.start = start; -+ range.length = end - start; -+ -+ if (range.length == 0) -+ return FALSE; -+ -+ if (attr.underline) { -+ attrs[n_attrs].name = "underline"; -+ attrs[n_attrs].value = "true"; -+ n_attrs++; -+ } -+ -+ if (attr.strikethrough) { -+ attrs[n_attrs].name = "strikethrough"; -+ attrs[n_attrs].value = "true"; -+ n_attrs++; -+ } -+ -+ g_snprintf (fg_color, sizeof fg_color, "%u,%u,%u", -+ attr.fore.red, attr.fore.green, attr.fore.blue); -+ attrs[n_attrs].name = "fg-color"; -+ attrs[n_attrs].value = fg_color; -+ n_attrs++; -+ -+ g_snprintf (bg_color, sizeof bg_color, "%u,%u,%u", -+ attr.back.red, attr.back.green, attr.back.blue); -+ attrs[n_attrs].name = "bg-color"; -+ attrs[n_attrs].value = bg_color; -+ n_attrs++; -+ -+ *attribute_names = g_new0 (char *, n_attrs + 1); -+ *attribute_values = g_new0 (char *, n_attrs + 1); -+ *n_ranges = 1; -+ *ranges = (GtkAccessibleTextRange *)g_memdup2 (&range, sizeof range); -+ -+ for (i = 0; i < n_attrs; i++) { -+ (*attribute_names)[i] = g_strdup (attrs[i].name); -+ (*attribute_values)[i] = g_strdup (attrs[i].value); -+ } -+ -+ return TRUE; -+} -+ -+void -+_vte_accessible_text_iface_init (GtkAccessibleTextInterface *iface) -+{ -+ iface->get_attributes = vte_accessible_text_get_attributes; -+ iface->get_caret_position = vte_accessible_text_get_caret_position; -+ iface->get_contents = vte_accessible_text_get_contents; -+ iface->get_contents_at = vte_accessible_text_get_contents_at; -+ iface->get_selection = vte_accessible_text_get_selection; -+} -+ -+static void -+vte_accessible_text_contents_changed (VteTerminal *terminal, -+ VteAccessibleText *state) -+{ -+ VteAccessibleTextContents *next = nullptr; -+ VteAccessibleTextContents *prev = nullptr; -+ const char *nextstr; -+ const char *prevstr; -+ gsize prevlen; -+ gsize nextlen; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ -+ prev = &state->contents[state->contents_flip]; -+ next = &state->contents[!state->contents_flip]; -+ -+ /* Get a new snapshot of contents so that we can compare this to the -+ * previous contents. That way we can discover if it was a backspace -+ * that occurred or if it's more than that. -+ * -+ * We do not filp state->contents_flip immediately so that we can -+ * allow the AT context the ability to access the current contents -+ * on DELETE operations. -+ */ -+ vte_accessible_text_contents_reset (next); -+ vte_accessible_text_contents_snapshot (next, state->terminal); -+ -+ nextstr = vte_accessible_text_contents_get_string (next, &nextlen); -+ prevstr = vte_accessible_text_contents_get_string (prev, &prevlen); -+ -+ vte_assert_cmpint (char_positions_get_size (&prev->characters), ==, prev->n_chars); -+ vte_assert_cmpint (char_positions_get_size (&next->characters), ==, next->n_chars); -+ -+ /* NOTE: -+ * -+ * The code below is based upon what vteaccess.cc did for GTK 3. -+ * It does not do any sort of appropriate diffing to try to handle -+ * scrolling correctly. That would be a good idea to implement in -+ * the longer term. -+ * -+ * It just looks for a long prefix match, and then a long suffix -+ * match and attempts to diff what is between those to end points. -+ */ -+ -+ const char *prevc = prevstr; -+ const char *nextc = nextstr; -+ gsize offset = 0; -+ -+ /* Find the beginning of changes */ -+ while ((offset < prev->n_chars) && (offset < next->n_chars)) { -+ gunichar prevch = g_utf8_get_char (prevc); -+ gunichar nextch = g_utf8_get_char (nextc); -+ -+ if (prevch != nextch) { -+ break; -+ } -+ -+ offset++; -+ -+ prevc = g_utf8_next_char (prevc); -+ nextc = g_utf8_next_char (nextc); -+ } -+ -+ /* Find the end of changes */ -+ gsize next_end = next->n_chars; -+ gsize prev_end = prev->n_chars; -+ -+ prevc = prevstr + prevlen; -+ nextc = nextstr + nextlen; -+ -+ while ((next_end > offset) && (prev_end > offset)) { -+ prevc = g_utf8_prev_char (prevc); -+ nextc = g_utf8_prev_char (nextc); -+ -+ gunichar prevch = g_utf8_get_char (prevc); -+ gunichar nextch = g_utf8_get_char (nextc); -+ -+ if (prevch != nextch) { -+ break; -+ } -+ -+ next_end--; -+ prev_end--; -+ } -+ -+ if (offset < prev_end) { -+ gtk_accessible_text_update_contents (GTK_ACCESSIBLE_TEXT (terminal), -+ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE, -+ offset, prev_end); -+ } -+ -+ state->contents_flip = !state->contents_flip; -+ -+ if (offset < next_end) { -+ gtk_accessible_text_update_contents (GTK_ACCESSIBLE_TEXT (terminal), -+ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT, -+ offset, next_end); -+ } -+ -+ if (prev->caret != next->caret) { -+ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); -+ } -+} -+ -+static void -+vte_accessible_text_cursor_moved (VteTerminal *terminal, -+ VteAccessibleText *state) -+{ -+ VteAccessibleTextContents *contents = nullptr; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ -+ contents = &state->contents[state->contents_flip]; -+ -+ long ccol, crow; -+ vte_terminal_get_cursor_position (terminal, &ccol, &crow); -+ if (ccol == contents->cached_caret_column && crow == contents->cached_caret_row) { -+ return; -+ } -+ -+ _vte_debug_print (VTE_DEBUG_ALLY, "Cursor at (%ld, " "%ld).\n", ccol, crow); -+ -+ contents->cached_caret_column = ccol; -+ contents->cached_caret_row = crow; -+ contents->caret = vte_accessible_text_contents_find_caret (contents, ccol, crow); -+ -+ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); -+} -+ -+static void -+vte_accessible_text_window_title_changed (VteTerminal *terminal, -+ VteAccessibleText *state) -+{ -+ const char *window_title; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ -+ window_title = vte_terminal_get_window_title (terminal); -+ -+ gtk_accessible_update_property (GTK_ACCESSIBLE (terminal), -+ GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, window_title ? window_title : "", -+ GTK_ACCESSIBLE_VALUE_UNDEFINED); -+} -+ -+static void -+vte_accessible_text_selection_changed (VteTerminal *terminal, -+ VteAccessibleText *state) -+{ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ -+ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); -+ gtk_accessible_text_update_selection_bound (GTK_ACCESSIBLE_TEXT (terminal)); -+} -+ -+void -+_vte_accessible_text_init (GtkAccessibleText *accessible) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state; -+ -+ state = g_new0 (VteAccessibleText, 1); -+ state->terminal = terminal; -+ -+ vte_accessible_text_contents_init (&state->contents[0]); -+ vte_accessible_text_contents_init (&state->contents[1]); -+ -+ g_object_set_data_full (G_OBJECT (terminal), -+ "VTE_ACCESSIBLE_TEXT", -+ state, -+ (GDestroyNotify)vte_accessible_text_free); -+ -+ g_signal_connect (terminal, -+ "contents-changed", -+ G_CALLBACK (vte_accessible_text_contents_changed), -+ state); -+ g_signal_connect (terminal, -+ "cursor-moved", -+ G_CALLBACK (vte_accessible_text_cursor_moved), -+ state); -+ g_signal_connect (terminal, -+ "selection-changed", -+ G_CALLBACK (vte_accessible_text_selection_changed), -+ state); -+ g_signal_connect (terminal, -+ "window-title-changed", -+ G_CALLBACK (vte_accessible_text_window_title_changed), -+ state); -+ -+ const char *window_title = vte_terminal_get_window_title (terminal); -+ -+ gtk_accessible_update_property (GTK_ACCESSIBLE (accessible), -+ GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, window_title ? window_title : "", -+ GTK_ACCESSIBLE_PROPERTY_HAS_POPUP, TRUE, -+ GTK_ACCESSIBLE_PROPERTY_LABEL, "Terminal", -+ GTK_ACCESSIBLE_PROPERTY_MULTI_LINE, TRUE, -+ GTK_ACCESSIBLE_VALUE_UNDEFINED); -+} -diff --git a/src/vteaccess-gtk4.h b/src/vteaccess-gtk4.h -new file mode 100644 -index 00000000..37b09c7b ---- /dev/null -+++ b/src/vteaccess-gtk4.h -@@ -0,0 +1,25 @@ -+/* -+ * Copyright © 2024 Christian Hergert -+ * -+ * This library is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU Lesser General Public License as published -+ * by the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public License -+ * along with this library. If not, see . -+ */ -+ -+#include -+ -+G_BEGIN_DECLS -+ -+void _vte_accessible_text_iface_init (GtkAccessibleTextInterface *iface); -+void _vte_accessible_text_init (GtkAccessibleText *accessible); -+ -+G_END_DECLS -diff --git a/src/vteaccess.cc b/src/vteaccess.cc -index fff918dc..c1c1a4c0 100644 ---- a/src/vteaccess.cc -+++ b/src/vteaccess.cc -@@ -386,6 +386,12 @@ _vte_terminal_accessible_text_modified(VteTerminalAccessible* accessible) - glong offset, caret_offset, olen, clen; - gint old_snapshot_caret; - -+ auto widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(accessible)); -+ auto terminal = VTE_TERMINAL(widget); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ - old_snapshot_caret = priv->snapshot_caret; - priv->snapshot_contents_invalid = TRUE; - vte_terminal_accessible_update_private_data_if_needed(accessible, -@@ -541,6 +547,9 @@ _vte_terminal_accessible_text_scrolled(VteTerminalAccessible* accessible, - auto widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(accessible)); - auto terminal = VTE_TERMINAL(widget); - -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ - row_count = vte_terminal_get_row_count(terminal); - if (((howmuch < 0) && (howmuch <= -row_count)) || - ((howmuch > 0) && (howmuch >= row_count))) { -@@ -793,6 +802,9 @@ vte_terminal_accessible_invalidate_cursor(VteTerminal *terminal, gpointer data) - VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; - VteTerminalAccessiblePrivate *priv = (VteTerminalAccessiblePrivate *)_vte_terminal_accessible_get_instance_private(accessible); - -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ - _vte_debug_print(VTE_DEBUG_ALLY, - "Invalidating accessibility cursor.\n"); - priv->snapshot_caret_invalid = TRUE; -@@ -807,6 +819,9 @@ vte_terminal_accessible_title_changed(VteTerminal *terminal, gpointer data) - { - VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; - -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ - atk_object_set_description(ATK_OBJECT(accessible), vte_terminal_get_window_title(terminal)); - } - -@@ -820,6 +835,9 @@ vte_terminal_accessible_visibility_notify(VteTerminal *terminal, - GtkWidget *widget; - gboolean visible; - -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return FALSE; -+ - visible = event->state != GDK_VISIBILITY_FULLY_OBSCURED; - /* The VISIBLE state indicates that this widget is "visible". */ - atk_object_notify_state_change(ATK_OBJECT(accessible), -@@ -851,6 +869,9 @@ vte_terminal_accessible_selection_changed (VteTerminal *terminal, - { - VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; - -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ - g_signal_emit_by_name (accessible, "text_selection_changed"); - } - -diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 92eb6881..082f3b95 100644 ---- a/src/vtegtk.cc -+++ b/src/vtegtk.cc -@@ -65,9 +65,11 @@ - #include - - #if WITH_A11Y --#if VTE_GTK == 3 --#include "vteaccess.h" --#endif /* VTE_GTK == 3 */ -+# if VTE_GTK == 3 -+# include "vteaccess.h" -+# elif VTE_GTK == 4 -+# include "vteaccess-gtk4.h" -+# endif - #endif /* WITH_A11Y */ - - #if WITH_ICU -@@ -155,6 +157,14 @@ private: - std::shared_ptr m_widget; - }; - -+#if defined(WITH_A11Y) && VTE_GTK == 4 -+# define VTE_IMPLEMENT_ACCESSIBLE \ -+ G_IMPLEMENT_INTERFACE(GTK_TYPE_ACCESSIBLE_TEXT, \ -+ _vte_accessible_text_iface_init) -+#else -+# define VTE_IMPLEMENT_ACCESSIBLE -+#endif -+ - #if VTE_DEBUG - G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, - { -@@ -163,6 +173,7 @@ G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, - } - g_type_add_class_private (g_define_type_id, sizeof (VteTerminalClassPrivate)); - G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr) -+ VTE_IMPLEMENT_ACCESSIBLE - if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) { - g_printerr("vte_terminal_get_type()\n"); - }) -@@ -173,7 +184,8 @@ G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, - g_type_add_instance_private(g_define_type_id, sizeof(VteTerminalPrivate)); - } - g_type_add_class_private (g_define_type_id, sizeof (VteTerminalClassPrivate)); -- G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr)) -+ G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr) -+ VTE_IMPLEMENT_ACCESSIBLE) - #endif - - static inline auto -@@ -901,6 +913,10 @@ try - gtk_widget_set_has_window(&terminal->widget, FALSE); - #endif - -+#if defined(WITH_A11Y) && VTE_GTK == 4 -+ _vte_accessible_text_init (GTK_ACCESSIBLE_TEXT (terminal)); -+#endif -+ - place = vte_terminal_get_instance_private(terminal); - new (place) VteTerminalPrivate{terminal}; - } -@@ -1011,6 +1027,9 @@ try - case PROP_DELETE_BINDING: - g_value_set_enum (value, widget->delete_binding()); - break; -+ case PROP_ENABLE_A11Y: -+ g_value_set_boolean (value, vte_terminal_get_enable_a11y (terminal)); -+ break; - case PROP_ENABLE_BIDI: - g_value_set_boolean (value, vte_terminal_get_enable_bidi (terminal)); - break; -@@ -1166,6 +1185,9 @@ try - case PROP_DELETE_BINDING: - vte_terminal_set_delete_binding (terminal, (VteEraseBinding)g_value_get_enum (value)); - break; -+ case PROP_ENABLE_A11Y: -+ vte_terminal_set_enable_a11y (terminal, g_value_get_boolean (value)); -+ break; - case PROP_ENABLE_BIDI: - vte_terminal_set_enable_bidi (terminal, g_value_get_boolean (value)); - break; -@@ -2226,6 +2248,22 @@ vte_terminal_class_init(VteTerminalClass *klass) - VTE_ERASE_AUTO, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); - -+ /** -+ * VteTerminal:enable-a11y: -+ * -+ * Controls whether or not a11y is enabled for the widget. -+ * -+ * Since: 0.78 -+ */ -+ pspecs[PROP_ENABLE_A11Y] = -+ g_param_spec_boolean ("enable-a11y", NULL, NULL, -+#if VTE_GTK == 3 -+ TRUE, -+#else -+ FALSE, -+#endif -+ (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); -+ - /** - * VteTerminal:enable-bidi: - * -@@ -2631,10 +2669,12 @@ vte_terminal_class_init(VteTerminalClass *klass) - err.assert_no_error(); - #endif - --#if VTE_GTK == 3 - #if WITH_A11Y -+#if VTE_GTK == 3 - /* a11y */ - gtk_widget_class_set_accessible_type(widget_class, VTE_TYPE_TERMINAL_ACCESSIBLE); -+#elif VTE_GTK == 4 -+ gtk_widget_class_set_accessible_role(widget_class, GTK_ACCESSIBLE_ROLE_TERMINAL); - #endif - #endif - } -@@ -5578,6 +5618,53 @@ catch (...) - vte::log_exception(); - } - -+/** -+ * vte_terminal_get_enable_a11y: -+ * @terminal: a #VteTerminal -+ * -+ * Checks whether the terminal communicates with a11y backends -+ * -+ * Returns: %TRUE if a11y is enabled, %FALSE if not -+ * -+ * Since: 0.78 -+ */ -+gboolean -+vte_terminal_get_enable_a11y(VteTerminal *terminal) noexcept -+try -+{ -+ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), false); -+ return IMPL(terminal)->m_enable_a11y; -+} -+catch (...) -+{ -+ vte::log_exception(); -+ return false; -+} -+ -+/** -+ * vte_terminal_set_enable_a11y: -+ * @terminal: a #VteTerminal -+ * @enable_a11y: %TRUE to enable a11y support -+ * -+ * Controls whether or not the terminal will communicate with a11y backends. -+ * -+ * Since: 0.78 -+ */ -+void -+vte_terminal_set_enable_a11y(VteTerminal *terminal, -+ gboolean enable_a11y) noexcept -+try -+{ -+ g_return_if_fail(VTE_IS_TERMINAL(terminal)); -+ -+ if (IMPL(terminal)->set_enable_a11y(enable_a11y != FALSE)) -+ g_object_notify_by_pspec(G_OBJECT(terminal), pspecs[PROP_ENABLE_A11Y]); -+} -+catch (...) -+{ -+ vte::log_exception(); -+} -+ - /** - * vte_terminal_get_enable_bidi: - * @terminal: a #VteTerminal -diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 1d1383af..a73957a0 100644 ---- a/src/vtegtk.hh -+++ b/src/vtegtk.hh -@@ -75,6 +75,7 @@ enum { - PROP_CURRENT_DIRECTORY_URI, - PROP_CURRENT_FILE_URI, - PROP_DELETE_BINDING, -+ PROP_ENABLE_A11Y, - PROP_ENABLE_BIDI, - PROP_ENABLE_FALLBACK_SCROLLING, - PROP_ENABLE_SHAPING, -diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index ed57ad16..4f8ade65 100644 ---- a/src/vteinternal.hh -+++ b/src/vteinternal.hh -@@ -776,6 +776,13 @@ public: - const char *m_hyperlink_hover_uri; /* data is owned by the ring */ - long m_hyperlink_auto_id{0}; - -+ /* Accessibility support */ -+#if VTE_GTK == 3 -+ bool m_enable_a11y{true}; -+#elif VTE_GTK == 4 -+ bool m_enable_a11y{false}; -+#endif -+ - /* RingView and friends */ - vte::base::RingView m_ringview; - bool m_enable_bidi{true}; -@@ -1505,6 +1512,7 @@ public: - bool set_cursor_style(CursorStyle style); - bool set_delete_binding(EraseMode binding); - auto delete_binding() const noexcept { return m_delete_binding; } -+ bool set_enable_a11y(bool setting); - bool set_enable_bidi(bool setting); - bool set_enable_shaping(bool setting); - bool set_encoding(char const* codeset, --- -2.44.0 - - -From 64ea71aef8878971fbca1c5f97b38be77a848eeb Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Wed, 7 Jan 2015 16:01:00 +0100 -Subject: [PATCH 02/12] Add sequences and signals for desktop notification - -Add sequences - OSC 777 ; notify ; SUMMARY ; BODY BEL - OSC 777 ; notify ; SUMMARY BEL - OSC 777 ; notify ; SUMMARY ; BODY ST - OSC 777 ; notify ; SUMMARY ST - -that let terminal applications send a notification to the desktop -environment. - -Based on Enlightenment's Terminology: -https://phab.enlightenment.org/T1765 - -https://bugzilla.gnome.org/show_bug.cgi?id=711059 ---- - src/marshal.list | 1 + - src/vte.cc | 10 ++++++++++ - src/vte/vteterminal.h | 4 +++- - src/vtegtk.cc | 25 +++++++++++++++++++++++++ - src/vtegtk.hh | 3 +++ - src/vteinternal.hh | 14 ++++++++++++++ - src/vteseq.cc | 37 +++++++++++++++++++++++++++++++++++++ - 7 files changed, 93 insertions(+), 1 deletion(-) - -diff --git a/src/marshal.list b/src/marshal.list -index 241128c3..4412cf3d 100644 ---- a/src/marshal.list -+++ b/src/marshal.list -@@ -1,3 +1,4 @@ - VOID:STRING,BOXED -+VOID:STRING,STRING - VOID:STRING,UINT - VOID:UINT,UINT -diff --git a/src/vte.cc b/src/vte.cc -index 6f5ed505..dd24a147 100644 ---- a/src/vte.cc -+++ b/src/vte.cc -@@ -10784,6 +10784,16 @@ Terminal::emit_pending_signals() - - emit_adjustment_changed(); - -+#if _VTE_GTK == 3 -+ if (m_pending_changes & vte::to_integral(PendingChanges::NOTIFICATION)) { -+ _vte_debug_print (VTE_DEBUG_SIGNALS, -+ "Emitting `notification-received'.\n"); -+ g_signal_emit(freezer.get(), signals[SIGNAL_NOTIFICATION_RECEIVED], 0, -+ m_notification_summary.c_str(), -+ m_notification_body.c_str()); -+ } -+#endif -+ - if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { - if (m_window_title != m_window_title_pending) { - m_window_title.swap(m_window_title_pending); -diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 33360909..36a32881 100644 ---- a/src/vte/vteterminal.h -+++ b/src/vte/vteterminal.h -@@ -114,9 +114,11 @@ struct _VteTerminalClass { - void (*bell)(VteTerminal* terminal); - - #if _VTE_GTK == 3 -+ void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); -+ - /* Compatibility padding due to fedora patches intruding on our ABI */ - /*< private >*/ -- gpointer _extra_padding[3]; -+ gpointer _extra_padding[2]; - #endif /* _VTE_GTK == 3 */ - - void (*setup_context_menu)(VteTerminal* terminal, -diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 082f3b95..e253a379 100644 ---- a/src/vtegtk.cc -+++ b/src/vtegtk.cc -@@ -1373,6 +1373,9 @@ vte_terminal_class_init(VteTerminalClass *klass) - klass->child_exited = NULL; - klass->encoding_changed = NULL; - klass->char_size_changed = NULL; -+#if _VTE_GTK == 3 -+ klass->notification_received = NULL; -+#endif - klass->window_title_changed = NULL; - klass->icon_title_changed = NULL; - klass->selection_changed = NULL; -@@ -1456,6 +1459,28 @@ vte_terminal_class_init(VteTerminalClass *klass) - G_OBJECT_CLASS_TYPE(klass), - g_cclosure_marshal_VOID__INTv); - -+#if _VTE_GTK == 3 -+ /** -+ * VteTerminal::notification-received: -+ * @vteterminal: the object which received the signal -+ * @summary: The summary -+ * @body: (allow-none): Extra optional text -+ * -+ * Emitted when a process running in the terminal wants to -+ * send a notification to the desktop environment. -+ */ -+ signals[SIGNAL_NOTIFICATION_RECEIVED] = -+ g_signal_new(I_("notification-received"), -+ G_OBJECT_CLASS_TYPE(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(VteTerminalClass, notification_received), -+ NULL, -+ NULL, -+ _vte_marshal_VOID__STRING_STRING, -+ G_TYPE_NONE, -+ 2, G_TYPE_STRING, G_TYPE_STRING); -+#endif -+ - /** - * VteTerminal::window-title-changed: - * @vteterminal: the object which received the signal -diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index a73957a0..bd49ed9b 100644 ---- a/src/vtegtk.hh -+++ b/src/vtegtk.hh -@@ -53,6 +53,9 @@ enum { - SIGNAL_RESTORE_WINDOW, - SIGNAL_SELECTION_CHANGED, - SIGNAL_SETUP_CONTEXT_MENU, -+#if _VTE_GTK == 3 -+ SIGNAL_NOTIFICATION_RECEIVED, -+#endif - SIGNAL_WINDOW_TITLE_CHANGED, - LAST_SIGNAL - }; -diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 4f8ade65..d7c82654 100644 ---- a/src/vteinternal.hh -+++ b/src/vteinternal.hh -@@ -710,6 +710,12 @@ public: - gboolean m_cursor_moved_pending; - gboolean m_contents_changed_pending; - -+#if _VTE_GTK == 3 -+ /* desktop notification */ -+ std::string m_notification_summary; -+ std::string m_notification_body; -+#endif -+ - std::string m_window_title{}; - std::string m_current_directory_uri{}; - std::string m_current_file_uri{}; -@@ -723,6 +729,9 @@ public: - TITLE = 1u << 0, - CWD = 1u << 1, - CWF = 1u << 2, -+#if _VTE_GTK == 3 -+ NOTIFICATION = 1u << 3, -+#endif - }; - unsigned m_pending_changes{0}; - -@@ -1662,6 +1671,11 @@ public: - int osc) noexcept; - - /* OSC handlers */ -+#if _VTE_GTK == 3 -+ void handle_urxvt_extension(vte::parser::Sequence const& seq, -+ vte::parser::StringTokeniser::const_iterator& token, -+ vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept; -+#endif - void set_color(vte::parser::Sequence const& seq, - vte::parser::StringTokeniser::const_iterator& token, - vte::parser::StringTokeniser::const_iterator const& endtoken, -diff --git a/src/vteseq.cc b/src/vteseq.cc -index 904837e1..7702c477 100644 ---- a/src/vteseq.cc -+++ b/src/vteseq.cc -@@ -1276,6 +1276,35 @@ Terminal::erase_in_line(vte::parser::Sequence const& seq) - m_text_deleted_flag = TRUE; - } - -+#if _VTE_GTK == 3 -+void -+Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, -+ vte::parser::StringTokeniser::const_iterator& token, -+ vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept -+{ -+ if (token == endtoken) -+ return; -+ -+ if (*token == "notify") { -+ ++token; -+ -+ if (token == endtoken) -+ return; -+ -+ m_notification_summary = *token; -+ m_notification_body.clear(); -+ m_pending_changes |= vte::to_integral(PendingChanges::NOTIFICATION); -+ ++token; -+ -+ if (token == endtoken) -+ return; -+ -+ m_notification_body = *token; -+ return; -+ } -+} -+#endif -+ - bool - Terminal::get_osc_color_index(int osc, - int value, -@@ -6596,6 +6625,12 @@ Terminal::OSC(vte::parser::Sequence const& seq) - reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE); - break; - -+#if _VTE_GTK == 3 -+ case VTE_OSC_URXVT_EXTENSION: -+ handle_urxvt_extension(seq, it, cend); -+ break; -+#endif -+ - case VTE_OSC_XTERM_SET_ICON_TITLE: - case VTE_OSC_XTERM_SET_XPROPERTY: - case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG: -@@ -6636,7 +6671,9 @@ Terminal::OSC(vte::parser::Sequence const& seq) - case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC: - case VTE_OSC_URXVT_VIEW_UP: - case VTE_OSC_URXVT_VIEW_DOWN: -+#if _VTE_GTK != 3 - case VTE_OSC_URXVT_EXTENSION: -+#endif - case VTE_OSC_YF_RQGWR: - default: - break; --- -2.44.0 - - -From d129d56171c4059a8622a63e7a27ee9306590377 Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Thu, 29 Jan 2015 13:09:17 +0100 -Subject: [PATCH 03/12] vte.sh: Emit OSC 777 from PROMPT_COMMAND - -For some reason, the three consecutive backslashes break the parsing. -As Christian Persch suggested, replacing the double quotes with -singles fixes it. - -https://bugzilla.gnome.org/show_bug.cgi?id=711059 ---- - src/vte.sh.in | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/vte.sh.in b/src/vte.sh.in -index 2328a9ec..157bd29c 100644 ---- a/src/vte.sh.in -+++ b/src/vte.sh.in -@@ -33,10 +33,12 @@ __vte_osc7 () { - } - - __vte_prompt_command() { -+ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//') -+ command="${command//;/ }" - local pwd='~' - [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} - pwd="${pwd//[[:cntrl:]]}" -- printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${pwd}" -+ printf '\033]777;notify;Command completed;%s\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" - __vte_osc7 - } - --- -2.44.0 - - -From da46de7cb882f7682d3605f374730ddccd9dfa0d Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Thu, 22 Jan 2015 16:37:10 +0100 -Subject: [PATCH 04/12] Test the notification-received signal - ---- - src/app/app.cc | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/src/app/app.cc b/src/app/app.cc -index e4e7b978..875022e9 100644 ---- a/src/app/app.cc -+++ b/src/app/app.cc -@@ -2943,6 +2943,14 @@ window_window_title_changed_cb(VteTerminal* terminal, - gtk_window_set_title(GTK_WINDOW(window), title && title[0] ? title : "Terminal"); - } - -+static void -+notification_received_cb(VteTerminal *terminal, -+ const gchar *summary, -+ const gchar *body) -+{ -+ g_print("[%s]: %s\n", summary, body); -+} -+ - static void - window_lower_window_cb(VteTerminal* terminal, - VteappWindow* window) -@@ -3234,8 +3242,9 @@ vteapp_window_constructed(GObject *object) - if (options.object_notifications) - g_signal_connect(window->terminal, "notify", G_CALLBACK(window_notify_cb), window); - -- /* Settings */ - #if VTE_GTK == 3 -+ g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); -+ - if (!options.double_buffer) { - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - gtk_widget_set_double_buffered(GTK_WIDGET(window->terminal), false); --- -2.44.0 - - -From 6a61519759cc00a7e8e2469eb4bebcfe39307215 Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Fri, 13 May 2016 17:53:54 +0200 -Subject: [PATCH 05/12] Add a property to configure the scroll speed - -By default, it is set to zero which gives the current behaviour of -moving the buffer by a function of the number of visible rows. - -https://bugzilla.redhat.com/show_bug.cgi?id=1103380 ---- - src/vte.cc | 25 ++++++++++++++++++ - src/vte/vteterminal.h | 6 +++++ - src/vtegtk.cc | 59 +++++++++++++++++++++++++++++++++++++++++++ - src/vtegtk.hh | 3 +++ - src/vteinternal.hh | 6 +++++ - 5 files changed, 99 insertions(+) - -diff --git a/src/vte.cc b/src/vte.cc -index dd24a147..24deaead 100644 ---- a/src/vte.cc -+++ b/src/vte.cc -@@ -10033,6 +10033,9 @@ vte_cairo_get_clip_region(cairo_t *cr) - bool - Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) - { -+#if _VTE_GTK == 3 -+ gdouble scroll_speed; -+#endif - gdouble v; - gint cnt, i; - int button; -@@ -10068,7 +10071,17 @@ Terminal::widget_mouse_scroll(vte::platform::ScrollEvent const& event) - return true; - } - -+#if _VTE_GTK == 3 -+ if (m_scroll_speed == 0) { -+ scroll_speed = ceil (m_row_count /* page increment */ / 10.); -+ } else { -+ scroll_speed = m_scroll_speed; -+ } -+ -+ v = MAX (1., scroll_speed); -+#else - v = MAX (1., ceil (m_row_count /* page increment */ / 10.)); -+#endif - _vte_debug_print(VTE_DEBUG_EVENTS, - "Scroll speed is %d lines per non-smooth scroll unit\n", - (int) v); -@@ -10399,6 +10412,18 @@ Terminal::decscusr_cursor_shape() const noexcept - } - } - -+#if _VTE_GTK == 3 -+bool -+Terminal::set_scroll_speed(unsigned int scroll_speed) -+{ -+ if (scroll_speed == m_scroll_speed) -+ return false; -+ -+ m_scroll_speed = scroll_speed; -+ return true; -+} -+#endif -+ - bool - Terminal::set_scrollback_lines(long lines) - { -diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 36a32881..ec56a0ce 100644 ---- a/src/vte/vteterminal.h -+++ b/src/vte/vteterminal.h -@@ -343,6 +343,12 @@ void vte_terminal_set_cursor_shape(VteTerminal *terminal, - _VTE_PUBLIC - VteCursorShape vte_terminal_get_cursor_shape(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); - -+#if _VTE_GTK == 3 -+_VTE_PUBLIC -+void vte_terminal_set_scroll_speed(VteTerminal *terminal, -+ guint scroll_speed) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+#endif -+ - /* Set the number of scrollback lines, above or at an internal minimum. */ - _VTE_PUBLIC - void vte_terminal_set_scrollback_lines(VteTerminal *terminal, -diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index e253a379..a22a7049 100644 ---- a/src/vtegtk.cc -+++ b/src/vtegtk.cc -@@ -1072,6 +1072,11 @@ try - case PROP_REWRAP_ON_RESIZE: - g_value_set_boolean (value, vte_terminal_get_rewrap_on_resize (terminal)); - break; -+#if _VTE_GTK == 3 -+ case PROP_SCROLL_SPEED: -+ g_value_set_uint (value, impl->m_scroll_speed); -+ break; -+#endif - case PROP_SCROLLBACK_LINES: - g_value_set_uint (value, vte_terminal_get_scrollback_lines(terminal)); - break; -@@ -1225,6 +1230,11 @@ try - case PROP_REWRAP_ON_RESIZE: - vte_terminal_set_rewrap_on_resize (terminal, g_value_get_boolean (value)); - break; -+#if _VTE_GTK == 3 -+ case PROP_SCROLL_SPEED: -+ vte_terminal_set_scroll_speed (terminal, g_value_get_uint (value)); -+ break; -+#endif - case PROP_SCROLLBACK_LINES: - vte_terminal_set_scrollback_lines (terminal, g_value_get_uint (value)); - break; -@@ -2444,6 +2454,23 @@ vte_terminal_class_init(VteTerminalClass *klass) - TRUE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); - -+#if _VTE_GTK == 3 -+ /** -+ * VteTerminal:scroll-speed: -+ * -+ * The number of lines by which the buffer is moved when -+ * scrolling with a mouse wheel on top of the terminal -+ * Setting it to zero will cause the buffer to be moved by an -+ * amount depending on the number of visible rows the widget -+ * can display. -+ */ -+ pspecs[PROP_SCROLL_SPEED] = -+ g_param_spec_uint ("scroll-speed", NULL, NULL, -+ 0, G_MAXUINT, -+ 0, -+ (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); -+#endif -+ - /** - * VteTerminal:scrollback-lines: - * -@@ -6503,6 +6530,38 @@ catch (...) - return -1; - } - -+#if _VTE_GTK == 3 -+/** -+ * vte_terminal_set_scroll_speed: -+ * @terminal: a #VteTerminal -+ * @scroll_speed: move the buffer by this number of lines while scrolling -+ * -+ * Sets the number of lines by which the buffer is moved when -+ * scrolling with a mouse wheel. Setting it to zero will cause the -+ * buffer to be moved by an amount depending on the number of visible -+ * rows the widget can display. -+ */ -+void -+vte_terminal_set_scroll_speed(VteTerminal *terminal, -+ guint scroll_speed) noexcept -+try -+{ -+ g_return_if_fail(VTE_IS_TERMINAL(terminal)); -+ -+ GObject *object = G_OBJECT(terminal); -+ g_object_freeze_notify(object); -+ -+ if (IMPL(terminal)->set_scroll_speed(scroll_speed)) -+ g_object_notify_by_pspec(object, pspecs[PROP_SCROLL_SPEED]); -+ -+ g_object_thaw_notify(object); -+} -+catch (...) -+{ -+ vte::log_exception(); -+} -+#endif -+ - /** - * vte_terminal_set_scrollback_lines: - * @terminal: a #VteTerminal -diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index bd49ed9b..125c109d 100644 ---- a/src/vtegtk.hh -+++ b/src/vtegtk.hh -@@ -93,6 +93,9 @@ enum { - PROP_MOUSE_POINTER_AUTOHIDE, - PROP_PTY, - PROP_REWRAP_ON_RESIZE, -+#if _VTE_GTK == 3 -+ PROP_SCROLL_SPEED, -+#endif - PROP_SCROLLBACK_LINES, - PROP_SCROLL_ON_INSERT, - PROP_SCROLL_ON_KEYSTROKE, -diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index d7c82654..53737f65 100644 ---- a/src/vteinternal.hh -+++ b/src/vteinternal.hh -@@ -471,6 +471,9 @@ public: - bool m_scroll_on_insert{false}; - bool m_scroll_on_output{false}; - bool m_scroll_on_keystroke{true}; -+#if _VTE_GTK == 3 -+ guint m_scroll_speed; -+#endif - vte::grid::row_t m_scrollback_lines{0}; - - inline auto scroll_limit_lower() const noexcept -@@ -1534,6 +1537,9 @@ public: - bool set_input_enabled(bool enabled); - bool set_mouse_autohide(bool autohide); - bool set_rewrap_on_resize(bool rewrap); -+#if _VTE_GTK == 3 -+ bool set_scroll_speed(unsigned int scroll_speed); -+#endif - bool set_scrollback_lines(long lines); - bool set_fallback_scrolling(bool set); - auto fallback_scrolling() const noexcept { return m_fallback_scrolling; } --- -2.44.0 - - -From a3a76d2dcd4f48dbe4c19c653dbd647d2c9d4e4d Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Fri, 13 May 2016 17:54:57 +0200 -Subject: [PATCH 06/12] Test the scroll-speed property - -https://bugzilla.redhat.com/show_bug.cgi?id=1103380 ---- - src/app/app.cc | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/src/app/app.cc b/src/app/app.cc -index 875022e9..f1b96a33 100644 ---- a/src/app/app.cc -+++ b/src/app/app.cc -@@ -135,6 +135,9 @@ public: - int verbosity{0}; - double cell_height_scale{1.0}; - double cell_width_scale{1.0}; -+#if _VTE_GTK == 3 -+ unsigned int scroll_speed{0}; -+#endif - VteCursorBlinkMode cursor_blink_mode{VTE_CURSOR_BLINK_SYSTEM}; - VteCursorShape cursor_shape{VTE_CURSOR_SHAPE_BLOCK}; - VteTextBlinkMode text_blink_mode{VTE_TEXT_BLINK_ALWAYS}; -@@ -1309,6 +1312,12 @@ public: - "Enable the setting of the icon title", nullptr }, - { "output-file", 0, 0, G_OPTION_ARG_FILENAME, &output_filename, - "Save terminal contents to file at exit", nullptr }, -+#if _VTE_GTK == 3 -+ { "scroll-speed", 0, 0, G_OPTION_ARG_INT, &scroll_speed, -+ "Specify the scroll speed", nullptr }, -+#endif -+ { "scroll-unit-is-pixels", 0, 0, G_OPTION_ARG_NONE, &scroll_unit_is_pixels, -+ "Use pixels as scroll unit", nullptr }, - { "scrollback-lines", 'n', 0, G_OPTION_ARG_INT, &scrollback_lines, - "Specify the number of scrollback-lines (-1 for infinite)", nullptr }, - { "title", 0, 0, G_OPTION_ARG_STRING, &title, "Set the initial title of the window", "TITLE" }, -@@ -3279,6 +3288,9 @@ vteapp_window_constructed(GObject *object) - vte_terminal_set_scroll_on_insert(window->terminal, options.scroll_on_insert); - vte_terminal_set_scroll_on_output(window->terminal, options.scroll_on_output); - vte_terminal_set_scroll_on_keystroke(window->terminal, options.scroll_on_keystroke); -+#if _VTE_GTK == 3 -+ vte_terminal_set_scroll_speed(window->terminal, options.scroll_speed); -+#endif - vte_terminal_set_scroll_unit_is_pixels(window->terminal, options.scroll_unit_is_pixels); - vte_terminal_set_scrollback_lines(window->terminal, options.scrollback_lines); - vte_terminal_set_text_blink_mode(window->terminal, options.text_blink_mode); --- -2.44.0 - - -From 43dae28d61af42ccaa92854eaa64d5ba7d6d466d Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Wed, 7 Jan 2015 16:01:00 +0100 -Subject: [PATCH 07/12] Support preexec notifications from an interactive shell - -Add sequences - OSC 777 ; preexec BEL - OSC 777 ; preexec ST - -that can be used from an interactive shell's preexec hook to notify -the terminal emulator that a new command is about to be executed. -Examples of such hooks are Bash's PS0 and Zsh's preexec. - -The OSC 777 escape sequence is taken from Enlightenment's Terminology: -https://phab.enlightenment.org/T1765 - -https://bugzilla.gnome.org/show_bug.cgi?id=711059 -https://bugzilla.gnome.org/show_bug.cgi?id=711060 ---- - src/vte.cc | 6 ++++++ - src/vte.sh.in | 4 ++-- - src/vte/vteterminal.h | 3 ++- - src/vtegtk.cc | 18 ++++++++++++++++++ - src/vtegtk.hh | 1 + - src/vteinternal.hh | 1 + - src/vteseq.cc | 4 ++++ - 7 files changed, 34 insertions(+), 3 deletions(-) - -diff --git a/src/vte.cc b/src/vte.cc -index 24deaead..e9e51434 100644 ---- a/src/vte.cc -+++ b/src/vte.cc -@@ -10817,6 +10817,12 @@ Terminal::emit_pending_signals() - m_notification_summary.c_str(), - m_notification_body.c_str()); - } -+ -+ if (m_pending_changes & vte::to_integral(PendingChanges::SHELL_PREEXEC)) { -+ _vte_debug_print (VTE_DEBUG_SIGNALS, -+ "Emitting `shell-preexec'.\n"); -+ g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); -+ } - #endif - - if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { -diff --git a/src/vte.sh.in b/src/vte.sh.in -index 157bd29c..ffc0942a 100644 ---- a/src/vte.sh.in -+++ b/src/vte.sh.in -@@ -51,9 +51,9 @@ if [[ -n "${BASH_VERSION:-}" ]]; then - # use the __vte_prompt_command function which also sets the title. - - if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then -- PROMPT_COMMAND+=(__vte_osc7) -+ PROMPT_COMMAND+=(__vte_osc7) && PS0=$(printf "\033]777;preexec\033\\") - else -- PROMPT_COMMAND="__vte_prompt_command" -+ PROMPT_COMMAND="__vte_prompt_command" && PS0=$(printf "\033]777;preexec\033\\") - fi - - # Shell integration -diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index ec56a0ce..efd8732b 100644 ---- a/src/vte/vteterminal.h -+++ b/src/vte/vteterminal.h -@@ -115,10 +115,11 @@ struct _VteTerminalClass { - - #if _VTE_GTK == 3 - void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); -+ void (*shell_preexec)(VteTerminal* terminal); - - /* Compatibility padding due to fedora patches intruding on our ABI */ - /*< private >*/ -- gpointer _extra_padding[2]; -+ gpointer _extra_padding[1]; - #endif /* _VTE_GTK == 3 */ - - void (*setup_context_menu)(VteTerminal* terminal, -diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index a22a7049..f8d971c1 100644 ---- a/src/vtegtk.cc -+++ b/src/vtegtk.cc -@@ -1385,6 +1385,7 @@ vte_terminal_class_init(VteTerminalClass *klass) - klass->char_size_changed = NULL; - #if _VTE_GTK == 3 - klass->notification_received = NULL; -+ klass->shell_preexec = NULL; - #endif - klass->window_title_changed = NULL; - klass->icon_title_changed = NULL; -@@ -1489,6 +1490,23 @@ vte_terminal_class_init(VteTerminalClass *klass) - _vte_marshal_VOID__STRING_STRING, - G_TYPE_NONE, - 2, G_TYPE_STRING, G_TYPE_STRING); -+ -+ /** -+ * VteTerminal::shell-preexec: -+ * @vteterminal: the object which received the signal -+ * -+ * Emitted when the interactive shell has read in a complete -+ * command and is about to execute it. -+ */ -+ signals[SIGNAL_SHELL_PREEXEC] = -+ g_signal_new(I_("shell-preexec"), -+ G_OBJECT_CLASS_TYPE(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(VteTerminalClass, shell_preexec), -+ NULL, -+ NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); - #endif - - /** -diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 125c109d..6252a2c8 100644 ---- a/src/vtegtk.hh -+++ b/src/vtegtk.hh -@@ -54,6 +54,7 @@ enum { - SIGNAL_SELECTION_CHANGED, - SIGNAL_SETUP_CONTEXT_MENU, - #if _VTE_GTK == 3 -+ SIGNAL_SHELL_PREEXEC, - SIGNAL_NOTIFICATION_RECEIVED, - #endif - SIGNAL_WINDOW_TITLE_CHANGED, -diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 53737f65..987aec0e 100644 ---- a/src/vteinternal.hh -+++ b/src/vteinternal.hh -@@ -734,6 +734,7 @@ public: - CWF = 1u << 2, - #if _VTE_GTK == 3 - NOTIFICATION = 1u << 3, -+ SHELL_PREEXEC = 1u << 4, - #endif - }; - unsigned m_pending_changes{0}; -diff --git a/src/vteseq.cc b/src/vteseq.cc -index 7702c477..17fb51f5 100644 ---- a/src/vteseq.cc -+++ b/src/vteseq.cc -@@ -1302,6 +1302,10 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, - m_notification_body = *token; - return; - } -+ -+ if (*token == "preexec") { -+ m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PREEXEC); -+ } - } - #endif - --- -2.44.0 - - -From 1b4029e85ad578dc602fc23bc5be07cd1341cfd0 Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Fri, 20 Apr 2018 18:21:53 +0200 -Subject: [PATCH 08/12] Test the shell-preexec signal - -https://bugzilla.gnome.org/show_bug.cgi?id=711059 -https://bugzilla.gnome.org/show_bug.cgi?id=711060 ---- - src/app/app.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/app/app.cc b/src/app/app.cc -index f1b96a33..4ccff275 100644 ---- a/src/app/app.cc -+++ b/src/app/app.cc -@@ -2960,6 +2960,12 @@ notification_received_cb(VteTerminal *terminal, - g_print("[%s]: %s\n", summary, body); - } - -+static void -+shell_preexec_cb(VteTerminal *terminal) -+{ -+ g_print("[shell] executing command\n"); -+} -+ - static void - window_lower_window_cb(VteTerminal* terminal, - VteappWindow* window) -@@ -3253,6 +3259,7 @@ vteapp_window_constructed(GObject *object) - - #if VTE_GTK == 3 - g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); -+ g_signal_connect(window->terminal, "shell-preexec", G_CALLBACK(shell_preexec_cb), NULL); - - if (!options.double_buffer) { - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; --- -2.44.0 - - -From 4e78d1bf97245c72aabe8bb971cadfd946c8cc17 Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Wed, 2 May 2018 17:20:30 +0200 -Subject: [PATCH 09/12] Support precmd notifications from an interactive shell - -Add sequences - OSC 777 ; precmd BEL - OSC 777 ; precmd ST - -that can be used from an interactive shell's precmd hook to notify the -terminal emulator that a first level prompt is about to be shown. -Examples of such hooks are Bash's PROMPT_COMMAND and Zsh's precmd. - -The OSC 777 escape sequence is taken from Enlightenment's Terminology: -https://phab.enlightenment.org/T1765 - -https://bugzilla.gnome.org/show_bug.cgi?id=711059 -https://bugzilla.gnome.org/show_bug.cgi?id=711060 ---- - src/vte.cc | 6 ++++++ - src/vte.sh.in | 9 ++++++++- - src/vte/vteterminal.h | 5 +---- - src/vtegtk.cc | 18 ++++++++++++++++++ - src/vtegtk.hh | 1 + - src/vteinternal.hh | 1 + - src/vteseq.cc | 4 +++- - 7 files changed, 38 insertions(+), 6 deletions(-) - -diff --git a/src/vte.cc b/src/vte.cc -index e9e51434..94a9db05 100644 ---- a/src/vte.cc -+++ b/src/vte.cc -@@ -10823,6 +10823,12 @@ Terminal::emit_pending_signals() - "Emitting `shell-preexec'.\n"); - g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); - } -+ -+ if (m_pending_changes & vte::to_integral(PendingChanges::SHELL_PRECMD)) { -+ _vte_debug_print (VTE_DEBUG_SIGNALS, -+ "Emitting `shell-precmd'.\n"); -+ g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PRECMD], 0); -+ } - #endif - - if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { -diff --git a/src/vte.sh.in b/src/vte.sh.in -index ffc0942a..5b415f5b 100644 ---- a/src/vte.sh.in -+++ b/src/vte.sh.in -@@ -28,6 +28,11 @@ case "$TERM" in - *) return 0 ;; - esac - -+__vte_shell_precmd() { -+ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//') -+ command="${command//;/ }" -+ printf '\033]777;notify;Command completed;%s\033\\\033]777;precmd\033\\' "${command}" -+} - __vte_osc7 () { - printf "\033]7;file://%s%s\033\\" "${HOSTNAME}" "$(@libexecdir@/vte-urlencode-cwd)" - } -@@ -38,7 +43,8 @@ __vte_prompt_command() { - local pwd='~' - [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} - pwd="${pwd//[[:cntrl:]]}" -- printf '\033]777;notify;Command completed;%s\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" -+ printf '\033]777;notify;Command completed;%s\033\\\033]777;precmd\033\\\033]0;%s@%s:%s\033\\' "${command}" "${USER}" "${HOSTNAME%%.*}" "${pwd}" -+ __vte_shell_precmd - __vte_osc7 - } - -@@ -51,6 +57,7 @@ if [[ -n "${BASH_VERSION:-}" ]]; then - # use the __vte_prompt_command function which also sets the title. - - if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then -+ PROMPT_COMMAND+=(__vte_shell_precmd) - PROMPT_COMMAND+=(__vte_osc7) && PS0=$(printf "\033]777;preexec\033\\") - else - PROMPT_COMMAND="__vte_prompt_command" && PS0=$(printf "\033]777;preexec\033\\") -diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index efd8732b..a2ff1b01 100644 ---- a/src/vte/vteterminal.h -+++ b/src/vte/vteterminal.h -@@ -115,11 +115,8 @@ struct _VteTerminalClass { - - #if _VTE_GTK == 3 - void (*notification_received)(VteTerminal* terminal, const gchar *summary, const gchar *body); -+ void (*shell_precmd)(VteTerminal* terminal); - void (*shell_preexec)(VteTerminal* terminal); -- -- /* Compatibility padding due to fedora patches intruding on our ABI */ -- /*< private >*/ -- gpointer _extra_padding[1]; - #endif /* _VTE_GTK == 3 */ - - void (*setup_context_menu)(VteTerminal* terminal, -diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index f8d971c1..d553a002 100644 ---- a/src/vtegtk.cc -+++ b/src/vtegtk.cc -@@ -1385,6 +1385,7 @@ vte_terminal_class_init(VteTerminalClass *klass) - klass->char_size_changed = NULL; - #if _VTE_GTK == 3 - klass->notification_received = NULL; -+ klass->shell_precmd = NULL; - klass->shell_preexec = NULL; - #endif - klass->window_title_changed = NULL; -@@ -1491,6 +1492,23 @@ vte_terminal_class_init(VteTerminalClass *klass) - G_TYPE_NONE, - 2, G_TYPE_STRING, G_TYPE_STRING); - -+ /** -+ * VteTerminal::shell-precmd: -+ * @vteterminal: the object which received the signal -+ * -+ * Emitted right before an interactive shell shows a -+ * first-level prompt. -+ */ -+ signals[SIGNAL_SHELL_PRECMD] = -+ g_signal_new(I_("shell-precmd"), -+ G_OBJECT_CLASS_TYPE(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(VteTerminalClass, shell_precmd), -+ NULL, -+ NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ - /** - * VteTerminal::shell-preexec: - * @vteterminal: the object which received the signal -diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 6252a2c8..3798ebc3 100644 ---- a/src/vtegtk.hh -+++ b/src/vtegtk.hh -@@ -54,6 +54,7 @@ enum { - SIGNAL_SELECTION_CHANGED, - SIGNAL_SETUP_CONTEXT_MENU, - #if _VTE_GTK == 3 -+ SIGNAL_SHELL_PRECMD, - SIGNAL_SHELL_PREEXEC, - SIGNAL_NOTIFICATION_RECEIVED, - #endif -diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 987aec0e..cfe2e0f0 100644 ---- a/src/vteinternal.hh -+++ b/src/vteinternal.hh -@@ -735,6 +735,7 @@ public: - #if _VTE_GTK == 3 - NOTIFICATION = 1u << 3, - SHELL_PREEXEC = 1u << 4, -+ SHELL_PRECMD = 1u << 5, - #endif - }; - unsigned m_pending_changes{0}; -diff --git a/src/vteseq.cc b/src/vteseq.cc -index 17fb51f5..a1155b19 100644 ---- a/src/vteseq.cc -+++ b/src/vteseq.cc -@@ -1303,7 +1303,9 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, - return; - } - -- if (*token == "preexec") { -+ if (*token == "precmd") { -+ m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PRECMD); -+ } else if (*token == "preexec") { - m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PREEXEC); - } - } --- -2.44.0 - - -From 9424e6c777ea0a7488457ddc7649a39ee579a68b Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Wed, 2 May 2018 17:30:48 +0200 -Subject: [PATCH 10/12] Test the shell-precmd signal - -https://bugzilla.gnome.org/show_bug.cgi?id=711059 -https://bugzilla.gnome.org/show_bug.cgi?id=711060 ---- - src/app/app.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/app/app.cc b/src/app/app.cc -index 4ccff275..bfb3d9f8 100644 ---- a/src/app/app.cc -+++ b/src/app/app.cc -@@ -2960,6 +2960,12 @@ notification_received_cb(VteTerminal *terminal, - g_print("[%s]: %s\n", summary, body); - } - -+static void -+shell_precmd_cb(VteTerminal *terminal) -+{ -+ g_print("[shell] showing command prompt\n"); -+} -+ - static void - shell_preexec_cb(VteTerminal *terminal) - { -@@ -3259,6 +3265,7 @@ vteapp_window_constructed(GObject *object) - - #if VTE_GTK == 3 - g_signal_connect(window->terminal, "notification-received", G_CALLBACK(notification_received_cb), NULL); -+ g_signal_connect(window->terminal, "shell-precmd", G_CALLBACK(shell_precmd_cb), NULL); - g_signal_connect(window->terminal, "shell-preexec", G_CALLBACK(shell_preexec_cb), NULL); - - if (!options.double_buffer) { --- -2.44.0 - - -From 2c262f071a679451312e141d940a8819ece44b52 Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Mon, 10 Jun 2019 20:30:18 +0200 -Subject: [PATCH 11/12] Support tracking the active container inside the - terminal - -Add sequences - - OSC 777 ; container ; push ; NAME ; RUNTIME ; UID BEL - OSC 777 ; container ; push ; NAME ; RUNTIME ; UID ST - OSC 777 ; container ; pop ; NAME ; RUNTIME ; UID BEL - OSC 777 ; container ; pop ; NAME ; RUNTIME ; UID ST - - OSC 777 ; container ; push ; NAME ; RUNTIME BEL - OSC 777 ; container ; push ; NAME ; RUNTIME ST - OSC 777 ; container ; pop ; NAME ; RUNTIME BEL - OSC 777 ; container ; pop ; NAME ; RUNTIME ST - -that let container tools notify the terminal emulator when entering and -leaving a container environment. The RUNTIME argument namespaces the -NAME and identifies the container tooling being used. eg., docker, -flatpak, podman, toolbox, etc.. The UID argument is the real UID of the -container tools. Only those containers that are used with the same real -UID as the VTE process are tracked. - -The OSC 777 escape sequence is taken from Enlightenment's Terminology: -https://phab.enlightenment.org/T1765 - -It's a VTE-specific extension until a standard escape sequence is -agreed upon across multiple different terminal emulators [1]. - -[1] https://gitlab.freedesktop.org/terminal-wg/specifications/issues/17 ---- - src/vte.cc | 8 ++++ - src/vte/vteterminal.h | 6 +++ - src/vtegtk.cc | 83 +++++++++++++++++++++++++++++++++++++++ - src/vtegtk.hh | 4 ++ - src/vteinternal.hh | 20 ++++++++++ - src/vteseq.cc | 90 +++++++++++++++++++++++++++++++++++++++++++ - 6 files changed, 211 insertions(+) - -diff --git a/src/vte.cc b/src/vte.cc -index 94a9db05..645bf330 100644 ---- a/src/vte.cc -+++ b/src/vte.cc -@@ -10829,6 +10829,14 @@ Terminal::emit_pending_signals() - "Emitting `shell-precmd'.\n"); - g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PRECMD], 0); - } -+ -+ if (m_pending_changes & vte::to_integral(PendingChanges::CONTAINERS)) { -+ _vte_debug_print(VTE_DEBUG_SIGNALS, -+ "Notifying `current-container-name' and `current-container-runtime'.\n"); -+ -+ g_object_notify_by_pspec(freezer.get(), pspecs[PROP_CURRENT_CONTAINER_NAME]); -+ g_object_notify_by_pspec(freezer.get(), pspecs[PROP_CURRENT_CONTAINER_RUNTIME]); -+ } - #endif - - if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { -diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index a2ff1b01..6d07e28e 100644 ---- a/src/vte/vteterminal.h -+++ b/src/vte/vteterminal.h -@@ -571,6 +571,12 @@ _VTE_PUBLIC - glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); - _VTE_PUBLIC - const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+#if _VTE_GTK == 3 -+_VTE_PUBLIC -+const char *vte_terminal_get_current_container_name(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+_VTE_PUBLIC -+const char *vte_terminal_get_current_container_runtime(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+#endif - _VTE_PUBLIC - const char *vte_terminal_get_current_directory_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); - _VTE_PUBLIC -diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index d553a002..1af238e1 100644 ---- a/src/vtegtk.cc -+++ b/src/vtegtk.cc -@@ -1015,6 +1015,14 @@ try - case PROP_CURSOR_BLINK_MODE: - g_value_set_enum (value, vte_terminal_get_cursor_blink_mode (terminal)); - break; -+#if _VTE_GTK == 3 -+ case PROP_CURRENT_CONTAINER_NAME: -+ g_value_set_string (value, vte_terminal_get_current_container_name (terminal)); -+ break; -+ case PROP_CURRENT_CONTAINER_RUNTIME: -+ g_value_set_string (value, vte_terminal_get_current_container_runtime (terminal)); -+ break; -+#endif - case PROP_CURRENT_DIRECTORY_URI: - g_value_set_string (value, vte_terminal_get_current_directory_uri (terminal)); - break; -@@ -2613,6 +2621,29 @@ vte_terminal_class_init(VteTerminalClass *klass) - NULL, - (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); - -+#if _VTE_GTK == 3 -+ /** -+ * VteTerminal:current-container-name: -+ * -+ * The name of the current container, or %NULL if unset. -+ */ -+ pspecs[PROP_CURRENT_CONTAINER_NAME] = -+ g_param_spec_string ("current-container-name", NULL, NULL, -+ NULL, -+ (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); -+ -+ /** -+ * VteTerminal:current-container-runtime: -+ * -+ * The name of the runtime toolset used to set up the current -+ * container, or %NULL if unset. -+ */ -+ pspecs[PROP_CURRENT_CONTAINER_RUNTIME] = -+ g_param_spec_string ("current-container-runtime", NULL, NULL, -+ NULL, -+ (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); -+#endif -+ - /** - * VteTerminal:current-directory-uri: - * -@@ -5547,6 +5578,58 @@ catch (...) - return -1; - } - -+#if _VTE_GTK == 3 -+/** -+ * vte_terminal_get_current_container_name: -+ * @terminal: a #VteTerminal -+ * -+ * Returns: (nullable) (transfer none): the name of the current -+ * container, or %NULL -+ */ -+const char * -+vte_terminal_get_current_container_name(VteTerminal *terminal) noexcept -+try -+{ -+ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL); -+ auto impl = IMPL(terminal); -+ if (impl->m_containers.empty()) -+ return NULL; -+ -+ const VteContainer &container = impl->m_containers.top(); -+ return container.m_name.c_str(); -+} -+catch (...) -+{ -+ vte::log_exception(); -+ return NULL; -+} -+ -+/** -+ * vte_terminal_get_current_container_runtime: -+ * @terminal: a #VteTerminal -+ * -+ * Returns: (nullable) (transfer none): the name of the runtime -+ * toolset used to set up the current container, or %NULL -+ */ -+const char * -+vte_terminal_get_current_container_runtime(VteTerminal *terminal) noexcept -+try -+{ -+ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL); -+ auto impl = IMPL(terminal); -+ if (impl->m_containers.empty()) -+ return NULL; -+ -+ const VteContainer &container = impl->m_containers.top(); -+ return container.m_runtime.c_str(); -+} -+catch (...) -+{ -+ vte::log_exception(); -+ return NULL; -+} -+#endif -+ - /** - * vte_terminal_get_current_directory_uri: - * @terminal: a #VteTerminal -diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 3798ebc3..065a6744 100644 ---- a/src/vtegtk.hh -+++ b/src/vtegtk.hh -@@ -77,6 +77,10 @@ enum { - PROP_CONTEXT_MENU, - PROP_CURSOR_BLINK_MODE, - PROP_CURSOR_SHAPE, -+#if _VTE_GTK == 3 -+ PROP_CURRENT_CONTAINER_NAME, -+ PROP_CURRENT_CONTAINER_RUNTIME, -+#endif - PROP_CURRENT_DIRECTORY_URI, - PROP_CURRENT_FILE_URI, - PROP_DELETE_BINDING, -diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index cfe2e0f0..ccd81bef 100644 ---- a/src/vteinternal.hh -+++ b/src/vteinternal.hh -@@ -63,6 +63,9 @@ - #include - #include - #include -+#if _VTE_GTK == 3 -+#include -+#endif - #include - #include - #include -@@ -121,6 +124,20 @@ typedef enum _VteCharacterReplacement { - VTE_CHARACTER_REPLACEMENT_LINE_DRAWING - } VteCharacterReplacement; - -+#if _VTE_GTK == 3 -+struct VteContainer { -+public: -+ VteContainer(const std::string &name, const std::string &runtime) : -+ m_name{name}, -+ m_runtime{runtime} -+ { -+ } -+ -+ std::string m_name; -+ std::string m_runtime; -+}; -+#endif -+ - typedef struct _VtePaletteColor { - struct { - vte::color::rgb color; -@@ -714,6 +731,8 @@ public: - gboolean m_contents_changed_pending; - - #if _VTE_GTK == 3 -+ std::stack m_containers; -+ - /* desktop notification */ - std::string m_notification_summary; - std::string m_notification_body; -@@ -736,6 +755,7 @@ public: - NOTIFICATION = 1u << 3, - SHELL_PREEXEC = 1u << 4, - SHELL_PRECMD = 1u << 5, -+ CONTAINERS = 1u << 6, - #endif - }; - unsigned m_pending_changes{0}; -diff --git a/src/vteseq.cc b/src/vteseq.cc -index a1155b19..daa24703 100644 ---- a/src/vteseq.cc -+++ b/src/vteseq.cc -@@ -19,6 +19,7 @@ - - #include "config.h" - -+ - #include - #include - #include -@@ -39,6 +40,11 @@ - #define ST_C0 _VTE_CAP_ST - - #include -+#if _VTE_GTK == 3 -+#include -+#include -+#include -+#endif - - using namespace std::literals; - -@@ -1285,6 +1291,90 @@ Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, - if (token == endtoken) - return; - -+#if _VTE_GTK == 3 -+ if (*token == "container") { -+ ++token; -+ -+ if (token == endtoken) -+ return; -+ -+ const std::string sub_command = *token; -+ ++token; -+ -+ if (sub_command == "pop") { -+ if (token == endtoken) -+ return; -+ -+ ++token; -+ -+ if (token == endtoken) -+ return; -+ -+ ++token; -+ -+ if (token == endtoken) { -+ if (!m_containers.empty()) { -+ m_containers.pop(); -+ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); -+ } -+ -+ return; -+ } -+ -+ const std::string uid_token = *token; -+ ++token; -+ -+ const uid_t uid = getuid(); -+ const std::string uid_str = std::to_string(uid); -+ -+ if (uid_token == uid_str) { -+ if (!m_containers.empty()) { -+ m_containers.pop(); -+ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); -+ } -+ -+ return; -+ } -+ -+ return; -+ } else if (sub_command == "push") { -+ if (token == endtoken) -+ return; -+ -+ const std::string name = *token; -+ ++token; -+ -+ if (token == endtoken) -+ return; -+ -+ const std::string runtime = *token; -+ ++token; -+ -+ if (token == endtoken) { -+ m_containers.emplace(name, runtime); -+ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); -+ return; -+ } -+ -+ const std::string uid_token = *token; -+ ++token; -+ -+ const uid_t uid = getuid(); -+ const std::string uid_str = std::to_string(uid); -+ -+ if (uid_token == uid_str) { -+ m_containers.emplace(name, runtime); -+ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); -+ return; -+ } -+ -+ return; -+ } -+ -+ return; -+ } -+#endif -+ - if (*token == "notify") { - ++token; - --- -2.44.0 - - -From 71a9ae3e685b492d50a23604865388cba7592d54 Mon Sep 17 00:00:00 2001 -From: Kalev Lember -Date: Tue, 16 Feb 2021 16:30:44 +0100 -Subject: [PATCH 12/12] Revert "widget: Limit select-all to the writable region - not including the scrollback" - -... as decided by Fedora Workstation WG. - -https://pagure.io/fedora-workstation/issue/216 - -This reverts commit 73713ec0644e232fb740170e399282be778d97f9. ---- - src/vte.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/vte.cc b/src/vte.cc -index 645bf330..d8f0faec 100644 ---- a/src/vte.cc -+++ b/src/vte.cc -@@ -7081,8 +7081,8 @@ Terminal::select_all() - - m_selecting_had_delta = TRUE; - -- m_selection_resolved.set ({ (vte::grid::row_t)m_screen->row_data->delta(), 0 }, -- { (vte::grid::row_t)m_screen->row_data->next(), 0 }); -+ m_selection_resolved.set ({ (long)m_screen->row_data->delta(), 0 }, -+ { (long)m_screen->row_data->next(), 0 }); - - _vte_debug_print(VTE_DEBUG_SELECTION, "Selecting *all* text.\n"); - --- -2.44.0 - From 20f805f6a3d1769d603d2862ab24ed5ed1ddb6ad Mon Sep 17 00:00:00 2001 From: David King Date: Fri, 7 Jun 2024 15:58:34 +0100 Subject: [PATCH 056/102] Use updated notification patches from ptyxis --- vte291.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vte291.spec b/vte291.spec index 7008c8b..6c8493a 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.76.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -24,7 +24,8 @@ Source0: https://download.gnome.org/sources/vte/0.76/vte-%{version}.tar.x # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 # https://pagure.io/fedora-workstation/issue/216 -Patch0: vte291-cntnr-precmd-preexec-scroll.patch +Patch: 0001-a11y-implement-GtkAccessibleText.patch +Patch: 0001-add-notification-and-shell-precmd-preexec.patch BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -179,6 +180,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Fri Jun 07 2024 David King - 0.76.2-2 +- Use updated notification patches from ptyxis + * Tue May 28 2024 David King - 0.76.2-1 - Update to 0.76.2 From 2ca928e0ae789378d65ed7b6e8609345764a4ca3 Mon Sep 17 00:00:00 2001 From: David King Date: Mon, 10 Jun 2024 09:16:35 +0100 Subject: [PATCH 057/102] Update to 0.76.3 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 11b2a42..13d385b 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,4 @@ /vte-0.76.0.tar.xz /vte-0.76.1.tar.xz /vte-0.76.2.tar.xz +/vte-0.76.3.tar.xz diff --git a/sources b/sources index 1f4ac86..d612df3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.76.2.tar.xz) = 206e2706c926972d4f389cf0418b840345ba6eb0336a3cae8b0d604f773b8b86746ef4986c94cfd6b0716449351ecb51a62f3ba08885b9cc8c8a8580e75f7fbf +SHA512 (vte-0.76.3.tar.xz) = 59cf3241f59b7ce795098814a04816d150330e4464a2438c974ac03cfd6aa05e7e037121a6a21929d6b12eb17fb1a4bf48c936604f0e0b770e3f125adb5a4c50 diff --git a/vte291.spec b/vte291.spec index 6c8493a..a664d79 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,8 +11,8 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.76.2 -Release: 2%{?dist} +Version: 0.76.3 +Release: 1%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -180,6 +180,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Jun 10 2024 David King - 0.76.3-1 +- Update to 0.76.3 + * Fri Jun 07 2024 David King - 0.76.2-2 - Use updated notification patches from ptyxis From 5a8515f4f4eefd66d47f79b57a7b49569fd93dab Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 09:02:43 +0000 Subject: [PATCH 058/102] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index a664d79..ed3cba8 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.76.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK+ 3 terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -180,6 +180,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 0.76.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Mon Jun 10 2024 David King - 0.76.3-1 - Update to 0.76.3 From 561614a74cb6ac56ee85ebe99494a77c343ce81f Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 24 Jul 2024 09:58:16 +0100 Subject: [PATCH 059/102] Update to 0.77.0 --- .gitignore | 1 + 0001-a11y-implement-GtkAccessibleText.patch | 1324 ----------------- ...otification-and-shell-precmd-preexec.patch | 533 ------- sources | 2 +- ...sh-forward-port-notify-prexec-precmd.patch | 50 + vte291.spec | 15 +- 6 files changed, 61 insertions(+), 1864 deletions(-) delete mode 100644 0001-a11y-implement-GtkAccessibleText.patch delete mode 100644 0001-add-notification-and-shell-precmd-preexec.patch create mode 100644 vte.sh-forward-port-notify-prexec-precmd.patch diff --git a/.gitignore b/.gitignore index 13d385b..1efe15b 100644 --- a/.gitignore +++ b/.gitignore @@ -101,3 +101,4 @@ /vte-0.76.1.tar.xz /vte-0.76.2.tar.xz /vte-0.76.3.tar.xz +/vte-0.77.0.tar.bz2 diff --git a/0001-a11y-implement-GtkAccessibleText.patch b/0001-a11y-implement-GtkAccessibleText.patch deleted file mode 100644 index 4361311..0000000 --- a/0001-a11y-implement-GtkAccessibleText.patch +++ /dev/null @@ -1,1324 +0,0 @@ -From aa096f3c96d8f4a736be7fdb48103daffd332296 Mon Sep 17 00:00:00 2001 -From: Christian Hergert -Date: Mon, 4 Mar 2024 14:09:53 -0800 -Subject: [PATCH] a11y: implement GtkAccessibleText - -This is an initial implementaiton of GtkAccessibleText which was added -to GTK for 4.14. It attempts to implement things in a very similar -fashion to the previous code for GTK 3 although considerable effort was -made to simplify and improve readability as to how it works. - -Currently, this supports reading back what you type and what has changed -on screen. It is not yet 1:1 what the GTK 3 a11y implementation did -because ATK was doing many other things (including proxying keyboard -keys) to the other side of the a11y bus. That appears to improve -readback by screen readers in the form of "backspace" and what character -was deleted. - -I expect things to get closer to 1:1 but that work is going to have to -be done inside of GTK itself first and should not require much if -anything here. - -A new VteTerminal:enable-a11y feature flag property has been added -because I'm concerned about enabling this by default until the a11y bus -learns to be more lazy. Currently there is no way to "do nothing" until -a peer (e.g. screenreader) is interested in the contents. - -Ideally, we would have a short-circuit like is currently implemented -by checking vte_terminal_get_enable_a11y() to avoid any sort of -contents calculation when there are no a11y observers. - -It also allows disabling the GTK 3 a11y implementation just to keep -some symmetry between the APIs. - -Currently, this does not implement "text-scrolled" like the GTK 3 -implementation does as I'm not sure yet if there is a benefit. ---- - src/meson.build | 13 +- - src/vte.cc | 11 + - src/vte/vteterminal.h | 7 + - src/vteaccess-gtk4.cc | 874 ++++++++++++++++++++++++++++++++++++++++++ - src/vteaccess-gtk4.h | 25 ++ - src/vteaccess.cc | 21 + - src/vtegtk.cc | 97 ++++- - src/vtegtk.hh | 1 + - src/vteinternal.hh | 8 + - 10 files changed, 1053 insertions(+), 10 deletions(-) - create mode 100644 src/vteaccess-gtk4.cc - create mode 100644 src/vteaccess-gtk4.h - -diff --git a/src/meson.build b/src/meson.build -index 3f89f492..6d1b4b2b 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -18,11 +18,16 @@ subdir('vte') - - src_inc = include_directories('.') - --a11y_sources = files( -+a11y_gtk3_sources = files( - 'vteaccess.cc', - 'vteaccess.h', - ) - -+a11y_gtk4_sources = files( -+ 'vteaccess-gtk4.cc', -+ 'vteaccess-gtk4.h', -+) -+ - debug_sources = files( - 'debug.cc', - 'debug.h', -@@ -300,7 +305,7 @@ if get_option('gtk3') - libvte_gtk3_public_deps = libvte_common_public_deps + [gtk3_dep,] - - if get_option('a11y') -- libvte_gtk3_sources += a11y_sources -+ libvte_gtk3_sources += a11y_gtk3_sources - endif - - libvte_gtk3 = shared_library( -@@ -349,6 +354,10 @@ if get_option('gtk4') - libvte_gtk4_deps = libvte_common_deps + [gtk4_dep,] - libvte_gtk4_public_deps = libvte_common_public_deps + [gtk4_dep,] - -+ if get_option('a11y') -+ libvte_gtk4_sources += a11y_gtk4_sources -+ endif -+ - libvte_gtk4 = shared_library( - vte_gtk4_api_name, - sources: libvte_gtk4_sources, -diff --git a/src/vte.cc b/src/vte.cc -index a8a0e22c..4d9bf411 100644 ---- a/src/vte.cc -+++ b/src/vte.cc -@@ -10132,6 +10132,17 @@ Terminal::set_text_blink_mode(TextBlinkMode setting) - return true; - } - -+bool -+Terminal::set_enable_a11y(bool setting) -+{ -+ if (setting == m_enable_a11y) -+ return false; -+ -+ m_enable_a11y = setting; -+ -+ return true; -+} -+ - bool - Terminal::set_enable_bidi(bool setting) - { -diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index 9c2e2dae..7f4bf6df 100644 ---- a/src/vte/vteterminal.h -+++ b/src/vte/vteterminal.h -@@ -388,6 +388,13 @@ _VTE_PUBLIC - void vte_terminal_set_delete_binding(VteTerminal *terminal, - VteEraseBinding binding) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); - -+/* Accessibility */ -+_VTE_PUBLIC -+void vte_terminal_set_enable_a11y(VteTerminal *terminal, -+ gboolean enable_a11y) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+_VTE_PUBLIC -+gboolean vte_terminal_get_enable_a11y(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+ - /* BiDi and shaping */ - _VTE_PUBLIC - void vte_terminal_set_enable_bidi(VteTerminal *terminal, -diff --git a/src/vteaccess-gtk4.cc b/src/vteaccess-gtk4.cc -new file mode 100644 -index 00000000..f42e7578 ---- /dev/null -+++ b/src/vteaccess-gtk4.cc -@@ -0,0 +1,874 @@ -+/* -+ * Copyright © 2024 Christian Hergert -+ * Copyright © 2002,2003 Red Hat, Inc. -+ * -+ * This library is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU Lesser General Public License as published -+ * by the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public License -+ * along with this library. If not, see . -+ */ -+ -+#include "config.h" -+ -+#include "vteinternal.hh" -+#include "vteaccess-gtk4.h" -+ -+#define GDK_ARRAY_NAME char_positions -+#define GDK_ARRAY_TYPE_NAME CharPositions -+#define GDK_ARRAY_ELEMENT_TYPE int -+#define GDK_ARRAY_BY_VALUE 1 -+#define GDK_ARRAY_PREALLOC 8 -+#define GDK_ARRAY_NO_MEMSET -+#include "gdkarrayimpl.c" -+ -+typedef struct _VteAccessibleTextContents -+{ -+ /* A GdkArrayImpl of attributes per byte */ -+ VteCharAttrList attrs; -+ -+ /* The byte position within the UTF-8 string where each visible -+ * character starts. -+ */ -+ CharPositions characters; -+ -+ /* The character position within the UTF-8 string where each line -+ * break occurs. To get byte offset, use @characters. -+ */ -+ CharPositions linebreaks; -+ -+ /* The UTF-8 string encoded as bytes so that we may reference it -+ * using GBytes for "substrings". However @string does include a -+ * trailing NUL byte in it's size so that the a11y infrastructure -+ * may elide some string copies. -+ */ -+ GBytes *string; -+ -+ /* Number of bytes in @string excluding trailing NUL. */ -+ gsize n_bytes; -+ -+ /* Number of unicode characters in @string. */ -+ gsize n_chars; -+ -+ /* The character position (not bytes) of the caret in @string */ -+ gsize caret; -+ -+ /* Cached column/row of the caret updated each time we are notified -+ * of the caret having moved. We cache this so that we can elide -+ * extraneous notifications after snapshoting. We will update the -+ * carent position synchronously when notified so @caret may always -+ * be relied upon as correct. -+ */ -+ long cached_caret_column; -+ long cached_caret_row; -+} VteAccessibleTextContents; -+ -+typedef struct _VteAccessibleText -+{ -+ VteTerminal *terminal; -+ VteAccessibleTextContents contents[2]; -+ guint contents_flip : 1; -+} VteAccessibleText; -+ -+static inline gboolean -+_pango_color_equal(const PangoColor *a, -+ const PangoColor *b) -+{ -+ return a->red == b->red && -+ a->green == b->green && -+ a->blue == b->blue; -+} -+ -+static void -+vte_accessible_text_contents_init (VteAccessibleTextContents *contents) -+{ -+ vte_char_attr_list_init (&contents->attrs); -+ char_positions_init (&contents->characters); -+ char_positions_init (&contents->linebreaks); -+ contents->string = nullptr; -+ contents->n_bytes = 0; -+ contents->n_chars = 0; -+ contents->caret = 0; -+ contents->cached_caret_row = 0; -+ contents->cached_caret_column = 0; -+} -+ -+static void -+vte_accessible_text_contents_clear (VteAccessibleTextContents *contents) -+{ -+ vte_char_attr_list_clear (&contents->attrs); -+ char_positions_clear (&contents->characters); -+ char_positions_clear (&contents->linebreaks); -+ g_clear_pointer (&contents->string, g_bytes_unref); -+ contents->n_bytes = 0; -+ contents->n_chars = 0; -+ contents->caret = 0; -+ contents->cached_caret_row = 0; -+ contents->cached_caret_column = 0; -+} -+ -+static void -+vte_accessible_text_contents_reset (VteAccessibleTextContents *contents) -+{ -+ vte_char_attr_list_set_size (&contents->attrs, 0); -+ char_positions_set_size (&contents->characters, 0); -+ char_positions_set_size (&contents->linebreaks, 0); -+ g_clear_pointer (&contents->string, g_bytes_unref); -+ contents->n_bytes = 0; -+ contents->n_chars = 0; -+ contents->caret = 0; -+ contents->cached_caret_row = 0; -+ contents->cached_caret_column = 0; -+} -+ -+static const char * -+vte_accessible_text_contents_get_string (VteAccessibleTextContents *contents, -+ gsize *len) -+{ -+ const char *ret; -+ -+ if (contents->string == nullptr || g_bytes_get_size (contents->string) == 0) { -+ *len = 0; -+ return ""; -+ } -+ -+ ret = (const char *)g_bytes_get_data (contents->string, len); -+ -+ if (*len > 0) { -+ (*len)--; -+ } -+ -+ return ret; -+} -+ -+static int -+vte_accessible_text_contents_offset_from_xy (VteAccessibleTextContents *contents, -+ int x, -+ int y) -+{ -+ int offset; -+ int linebreak; -+ int next_linebreak; -+ -+ if (y >= int(char_positions_get_size (&contents->linebreaks))) { -+ y = int(char_positions_get_size (&contents->linebreaks)) - 1; -+ if (y < 0) { -+ return 0; -+ } -+ } -+ -+ linebreak = *char_positions_index (&contents->linebreaks, y); -+ if (y + 1 == int(char_positions_get_size (&contents->linebreaks))) { -+ next_linebreak = int(char_positions_get_size (&contents->characters)); -+ } else { -+ next_linebreak = *char_positions_index (&contents->linebreaks, y + 1); -+ } -+ -+ offset = linebreak + x; -+ if (offset >= next_linebreak) { -+ offset = next_linebreak - 1; -+ } -+ -+ return offset; -+} -+ -+static gunichar -+vte_accessible_text_contents_get_char_at (VteAccessibleTextContents *contents, -+ guint offset) -+{ -+ const char *str; -+ -+ if (contents->string == nullptr) -+ return 0; -+ -+ if (offset >= contents->n_chars) -+ return 0; -+ -+ g_assert (offset < char_positions_get_size (&contents->characters)); -+ -+ str = (const char *)g_bytes_get_data (contents->string, nullptr); -+ str += *char_positions_index (&contents->characters, offset); -+ -+ return g_utf8_get_char (str); -+ -+} -+ -+static GBytes * -+_g_string_free_to_bytes_with_nul (GString *str) -+{ -+ /* g_string_free_to_bytes() will have a trailing-NUL but not include it -+ * in the size of the GBytes. We want the size included in our GBytes -+ * so that GtkAccessibleText may avoid some copies. -+ */ -+ gsize len = str->len + 1; -+ return g_bytes_new_take (g_string_free (str, FALSE), len); -+} -+ -+static inline gsize -+vte_accessible_text_contents_find_caret (VteAccessibleTextContents *contents, -+ long ccol, -+ long crow) -+{ -+ g_assert (contents != nullptr); -+ -+ /* Get the offsets to the beginnings of each line. */ -+ gsize caret = 0; -+ for (gsize i = 0; i < char_positions_get_size (&contents->characters); i++) { -+ /* Get the attributes for the current cell. */ -+ int offset = *char_positions_index (&contents->characters, i); -+ const struct _VteCharAttributes *attrs = vte_char_attr_list_get (&contents->attrs, offset); -+ -+ /* If this cell is "before" the cursor, move the caret to be "here". */ -+ if ((attrs->row < crow) || -+ ((attrs->row == crow) && (attrs->column < ccol))) { -+ caret = i + 1; -+ } -+ } -+ -+ return caret; -+} -+ -+static void -+vte_accessible_text_contents_snapshot (VteAccessibleTextContents *contents, -+ VteTerminal *terminal) -+{ -+ auto impl = _vte_terminal_get_impl (terminal); -+ GString *gstr = g_string_new (nullptr); -+ -+ try { -+ impl->get_text_displayed_a11y (gstr, &contents->attrs); -+ } catch (...) { -+ g_string_truncate (gstr, 0); -+ } -+ -+ if (vte_char_attr_list_get_size (&contents->attrs) >= G_MAXINT) { -+ g_string_truncate (gstr, 0); -+ return; -+ } -+ -+ /* Get the offsets to the beginnings of each character. */ -+ int i = 0; -+ const char *next = gstr->str; -+ int n_attrs = int(vte_char_attr_list_get_size (&contents->attrs)); -+ while (i < n_attrs) { -+ char_positions_append (&contents->characters, &i); -+ next = g_utf8_next_char (next); -+ if (next != nullptr) { -+ i = next - gstr->str; -+ continue; -+ } -+ break; -+ } -+ -+ /* Find offsets for the beginning of lines. */ -+ gsize n_chars = char_positions_get_size (&contents->characters); -+ int row; -+ for (i = 0, row = 0; i < int(n_chars); i++) { -+ /* Get the attributes for the current cell. */ -+ int offset = *char_positions_index (&contents->characters, i); -+ const struct _VteCharAttributes *attrs = vte_char_attr_list_get (&contents->attrs, offset); -+ -+ /* If this character is on a row different from the row -+ * the character we looked at previously was on, then -+ * it's a new line and we need to keep track of where -+ * it is. */ -+ if ((i == 0) || (attrs->row != row)) { -+ _vte_debug_print (VTE_DEBUG_ALLY, -+ "Row %d/%ld begins at %d.\n", -+ int(char_positions_get_size (&contents->linebreaks)), -+ attrs->row, i); -+ char_positions_append (&contents->linebreaks, &i); -+ } -+ -+ row = attrs->row; -+ } -+ -+ /* Add the final line break. */ -+ char_positions_append (&contents->linebreaks, &i); -+ -+ /* Update the caret position. */ -+ long ccol, crow; -+ vte_terminal_get_cursor_position (terminal, &ccol, &crow); -+ _vte_debug_print (VTE_DEBUG_ALLY, "Cursor at (%ld, " "%ld).\n", ccol, crow); -+ gsize caret = vte_accessible_text_contents_find_caret (contents, ccol, crow); -+ -+ contents->n_bytes = gstr->len; -+ contents->n_chars = n_chars; -+ contents->string = _g_string_free_to_bytes_with_nul (gstr); -+ contents->caret = caret; -+ contents->cached_caret_column = ccol; -+ contents->cached_caret_row = crow; -+ -+ _vte_debug_print (VTE_DEBUG_ALLY, -+ "Refreshed accessibility snapshot, " -+ "%ld cells, %ld characters.\n", -+ long(vte_char_attr_list_get_size(&contents->attrs)), -+ long(char_positions_get_size (&contents->characters))); -+} -+ -+static GBytes * -+vte_accessible_text_contents_slice (VteAccessibleTextContents *contents, -+ guint start, -+ guint end) -+{ -+ static const char empty[] = {0}; -+ guint start_offset; -+ guint end_offset; -+ -+ g_assert (contents != nullptr); -+ -+ if (contents->string == nullptr) -+ return g_bytes_new_static (empty, sizeof empty); -+ -+ if (start > contents->n_chars) -+ start = contents->n_chars; -+ -+ if (end > contents->n_chars) -+ end = contents->n_chars; -+ -+ if (end < start) -+ std::swap (end, start); -+ -+ g_assert (start <= char_positions_get_size (&contents->characters)); -+ g_assert (end <= char_positions_get_size (&contents->characters)); -+ -+ if (start == char_positions_get_size (&contents->characters)) -+ start_offset = g_bytes_get_size (contents->string); -+ else -+ start_offset = *char_positions_index (&contents->characters, start); -+ -+ if (end == char_positions_get_size (&contents->characters)) -+ end_offset = g_bytes_get_size (contents->string); -+ else -+ end_offset = *char_positions_index (&contents->characters, end); -+ -+ g_assert (start_offset <= end_offset); -+ -+ if (start_offset == end_offset) -+ return g_bytes_new_static (empty, sizeof empty); -+ -+ return g_bytes_new_from_bytes (contents->string, start_offset, end_offset - start_offset); -+} -+ -+static void -+vte_accessible_text_free (VteAccessibleText *state) -+{ -+ vte_accessible_text_contents_clear (&state->contents[0]); -+ vte_accessible_text_contents_clear (&state->contents[1]); -+ state->terminal = nullptr; -+ g_free (state); -+} -+ -+static VteAccessibleText * -+vte_accessible_text_get (VteTerminal *terminal) -+{ -+ return (VteAccessibleText *)g_object_get_data (G_OBJECT (terminal), "VTE_ACCESSIBLE_TEXT"); -+} -+ -+static GBytes * -+vte_accessible_text_get_contents (GtkAccessibleText *accessible, -+ guint start, -+ guint end) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ VteAccessibleTextContents *contents = nullptr; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ contents = &state->contents[state->contents_flip]; -+ -+ return vte_accessible_text_contents_slice (contents, start, end); -+} -+ -+static GBytes * -+vte_accessible_text_get_contents_at (GtkAccessibleText *accessible, -+ guint offset, -+ GtkAccessibleTextGranularity granularity, -+ guint *start, -+ guint *end) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ VteAccessibleTextContents *contents; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ auto impl = _vte_terminal_get_impl (terminal); -+ -+ contents = &state->contents[state->contents_flip]; -+ -+ if (contents->string == nullptr) { -+ return nullptr; -+ } -+ -+ if (offset > contents->n_chars) { -+ offset = contents->n_chars; -+ } -+ -+ switch (granularity) { -+ case GTK_ACCESSIBLE_TEXT_GRANULARITY_CHARACTER: { -+ *start = offset; -+ *end = offset + 1; -+ return vte_accessible_text_contents_slice (contents, offset, offset + 1); -+ } -+ -+ case GTK_ACCESSIBLE_TEXT_GRANULARITY_LINE: { -+ guint char_offset = *char_positions_index (&contents->characters, offset); -+ guint line; -+ -+ for (line = 0; -+ line < char_positions_get_size (&contents->linebreaks); -+ line++) { -+ guint line_offset = *char_positions_index (&contents->linebreaks, line); -+ -+ if (line_offset > char_offset) { -+ line--; -+ break; -+ } -+ } -+ -+ _vte_debug_print (VTE_DEBUG_ALLY, -+ "Character %u is on line %u.\n", -+ offset, line); -+ -+ *start = *char_positions_index (&contents->linebreaks, line); -+ if (line + 1 < char_positions_get_size (&contents->linebreaks)) -+ *end = *char_positions_index (&contents->linebreaks, line + 1); -+ else -+ *end = contents->n_chars; -+ -+ return vte_accessible_text_contents_slice (contents, *start, *end); -+ } -+ -+ case GTK_ACCESSIBLE_TEXT_GRANULARITY_WORD: { -+ gunichar ch = vte_accessible_text_contents_get_char_at (contents, offset); -+ -+ if (ch == 0 || !impl->is_word_char (ch)) -+ break; -+ -+ *start = offset; -+ *end = offset; -+ -+ while (*start > 0 && -+ (ch = vte_accessible_text_contents_get_char_at (contents, *start - 1)) && -+ impl->is_word_char (ch)) { -+ (*start)--; -+ } -+ -+ while (*end < contents->n_chars && -+ (ch = vte_accessible_text_contents_get_char_at (contents, *end + 1)) && -+ impl->is_word_char (ch)) { -+ (*end)++; -+ } -+ -+ return vte_accessible_text_contents_slice (contents, *start, *end); -+ } -+ -+ case GTK_ACCESSIBLE_TEXT_GRANULARITY_SENTENCE: -+ case GTK_ACCESSIBLE_TEXT_GRANULARITY_PARAGRAPH: -+ default: -+ break; -+ } -+ -+ return nullptr; -+} -+ -+static guint -+vte_accessible_text_get_caret_position (GtkAccessibleText *accessible) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ -+ g_assert (VTE_IS_TERMINAL (accessible)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ return state->contents[state->contents_flip].caret; -+} -+ -+static gboolean -+vte_accessible_text_get_selection (GtkAccessibleText *accessible, -+ gsize *n_ranges, -+ GtkAccessibleTextRange **ranges) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (ranges != nullptr); -+ -+ *n_ranges = 0; -+ *ranges = nullptr; -+ -+ try { -+ auto impl = _vte_terminal_get_impl (terminal); -+ VteAccessibleTextContents *contents = &state->contents[state->contents_flip]; -+ GtkAccessibleTextRange range; -+ -+ if (impl->m_selection_resolved.empty() || -+ impl->m_selection[vte::to_integral(vte::platform::ClipboardType::PRIMARY)] == nullptr) -+ return FALSE; -+ -+ auto start_column = impl->m_selection_resolved.start_column(); -+ auto start_row = impl->m_selection_resolved.start_row(); -+ auto end_column = impl->m_selection_resolved.end_column(); -+ auto end_row = impl->m_selection_resolved.end_row(); -+ -+ auto start_offset = vte_accessible_text_contents_offset_from_xy (contents, start_column, start_row); -+ auto end_offset = vte_accessible_text_contents_offset_from_xy (contents, end_column, end_row); -+ -+ range.start = gsize(start_offset); -+ range.length = gsize(end_offset - start_offset); -+ -+ *n_ranges = 1; -+ *ranges = (GtkAccessibleTextRange *)g_memdup2 (&range, sizeof range); -+ -+ return TRUE; -+ } catch (...) { } -+ -+ return FALSE; -+} -+ -+static gboolean -+vte_accessible_text_get_attributes (GtkAccessibleText *accessible, -+ guint offset, -+ gsize *n_ranges, -+ GtkAccessibleTextRange **ranges, -+ char ***attribute_names, -+ char ***attribute_values) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ VteAccessibleTextContents *contents; -+ struct _VteCharAttributes cur_attr; -+ struct _VteCharAttributes attr; -+ GtkAccessibleTextRange range; -+ struct { -+ const char *name; -+ const char *value; -+ } attrs[4]; -+ char fg_color[16]; -+ char bg_color[16]; -+ guint n_attrs = 0; -+ guint start = 0; -+ guint end = 0; -+ guint i; -+ -+ g_assert (VTE_IS_TERMINAL (accessible)); -+ g_assert (ranges != nullptr); -+ g_assert (attribute_names != nullptr); -+ g_assert (attribute_values != nullptr); -+ -+ contents = &state->contents[state->contents_flip]; -+ -+ *n_ranges = 0; -+ *ranges = nullptr; -+ *attribute_names = nullptr; -+ *attribute_values = nullptr; -+ -+ attr = *vte_char_attr_list_get (&contents->attrs, offset); -+ start = 0; -+ for (i = offset; i--;) { -+ cur_attr = *vte_char_attr_list_get (&contents->attrs, i); -+ if (!_pango_color_equal (&cur_attr.fore, &attr.fore) || -+ !_pango_color_equal (&cur_attr.back, &attr.back) || -+ cur_attr.underline != attr.underline || -+ cur_attr.strikethrough != attr.strikethrough) { -+ start = i + 1; -+ break; -+ } -+ } -+ end = vte_char_attr_list_get_size (&contents->attrs) - 1; -+ for (i = offset + 1; i < vte_char_attr_list_get_size (&contents->attrs); i++) { -+ cur_attr = *vte_char_attr_list_get (&contents->attrs, i); -+ if (!_pango_color_equal (&cur_attr.fore, &attr.fore) || -+ !_pango_color_equal (&cur_attr.back, &attr.back) || -+ cur_attr.underline != attr.underline || -+ cur_attr.strikethrough != attr.strikethrough) { -+ end = i - 1; -+ break; -+ } -+ } -+ -+ range.start = start; -+ range.length = end - start; -+ -+ if (range.length == 0) -+ return FALSE; -+ -+ if (attr.underline) { -+ attrs[n_attrs].name = "underline"; -+ attrs[n_attrs].value = "true"; -+ n_attrs++; -+ } -+ -+ if (attr.strikethrough) { -+ attrs[n_attrs].name = "strikethrough"; -+ attrs[n_attrs].value = "true"; -+ n_attrs++; -+ } -+ -+ g_snprintf (fg_color, sizeof fg_color, "%u,%u,%u", -+ attr.fore.red, attr.fore.green, attr.fore.blue); -+ attrs[n_attrs].name = "fg-color"; -+ attrs[n_attrs].value = fg_color; -+ n_attrs++; -+ -+ g_snprintf (bg_color, sizeof bg_color, "%u,%u,%u", -+ attr.back.red, attr.back.green, attr.back.blue); -+ attrs[n_attrs].name = "bg-color"; -+ attrs[n_attrs].value = bg_color; -+ n_attrs++; -+ -+ *attribute_names = g_new0 (char *, n_attrs + 1); -+ *attribute_values = g_new0 (char *, n_attrs + 1); -+ *n_ranges = 1; -+ *ranges = (GtkAccessibleTextRange *)g_memdup2 (&range, sizeof range); -+ -+ for (i = 0; i < n_attrs; i++) { -+ (*attribute_names)[i] = g_strdup (attrs[i].name); -+ (*attribute_values)[i] = g_strdup (attrs[i].value); -+ } -+ -+ return TRUE; -+} -+ -+void -+_vte_accessible_text_iface_init (GtkAccessibleTextInterface *iface) -+{ -+ iface->get_attributes = vte_accessible_text_get_attributes; -+ iface->get_caret_position = vte_accessible_text_get_caret_position; -+ iface->get_contents = vte_accessible_text_get_contents; -+ iface->get_contents_at = vte_accessible_text_get_contents_at; -+ iface->get_selection = vte_accessible_text_get_selection; -+} -+ -+static void -+vte_accessible_text_contents_changed (VteTerminal *terminal, -+ VteAccessibleText *state) -+{ -+ VteAccessibleTextContents *next = nullptr; -+ VteAccessibleTextContents *prev = nullptr; -+ const char *nextstr; -+ const char *prevstr; -+ gsize prevlen; -+ gsize nextlen; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ -+ prev = &state->contents[state->contents_flip]; -+ next = &state->contents[!state->contents_flip]; -+ -+ /* Get a new snapshot of contents so that we can compare this to the -+ * previous contents. That way we can discover if it was a backspace -+ * that occurred or if it's more than that. -+ * -+ * We do not filp state->contents_flip immediately so that we can -+ * allow the AT context the ability to access the current contents -+ * on DELETE operations. -+ */ -+ vte_accessible_text_contents_reset (next); -+ vte_accessible_text_contents_snapshot (next, state->terminal); -+ -+ nextstr = vte_accessible_text_contents_get_string (next, &nextlen); -+ prevstr = vte_accessible_text_contents_get_string (prev, &prevlen); -+ -+ vte_assert_cmpint (char_positions_get_size (&prev->characters), ==, prev->n_chars); -+ vte_assert_cmpint (char_positions_get_size (&next->characters), ==, next->n_chars); -+ -+ /* NOTE: -+ * -+ * The code below is based upon what vteaccess.cc did for GTK 3. -+ * It does not do any sort of appropriate diffing to try to handle -+ * scrolling correctly. That would be a good idea to implement in -+ * the longer term. -+ * -+ * It just looks for a long prefix match, and then a long suffix -+ * match and attempts to diff what is between those to end points. -+ */ -+ -+ const char *prevc = prevstr; -+ const char *nextc = nextstr; -+ gsize offset = 0; -+ -+ /* Find the beginning of changes */ -+ while ((offset < prev->n_chars) && (offset < next->n_chars)) { -+ gunichar prevch = g_utf8_get_char (prevc); -+ gunichar nextch = g_utf8_get_char (nextc); -+ -+ if (prevch != nextch) { -+ break; -+ } -+ -+ offset++; -+ -+ prevc = g_utf8_next_char (prevc); -+ nextc = g_utf8_next_char (nextc); -+ } -+ -+ /* Find the end of changes */ -+ gsize next_end = next->n_chars; -+ gsize prev_end = prev->n_chars; -+ -+ prevc = prevstr + prevlen; -+ nextc = nextstr + nextlen; -+ -+ while ((next_end > offset) && (prev_end > offset)) { -+ prevc = g_utf8_prev_char (prevc); -+ nextc = g_utf8_prev_char (nextc); -+ -+ gunichar prevch = g_utf8_get_char (prevc); -+ gunichar nextch = g_utf8_get_char (nextc); -+ -+ if (prevch != nextch) { -+ break; -+ } -+ -+ next_end--; -+ prev_end--; -+ } -+ -+ if (offset < prev_end) { -+ gtk_accessible_text_update_contents (GTK_ACCESSIBLE_TEXT (terminal), -+ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE, -+ offset, prev_end); -+ } -+ -+ state->contents_flip = !state->contents_flip; -+ -+ if (offset < next_end) { -+ gtk_accessible_text_update_contents (GTK_ACCESSIBLE_TEXT (terminal), -+ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT, -+ offset, next_end); -+ } -+ -+ if (prev->caret != next->caret) { -+ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); -+ } -+} -+ -+static void -+vte_accessible_text_cursor_moved (VteTerminal *terminal, -+ VteAccessibleText *state) -+{ -+ VteAccessibleTextContents *contents = nullptr; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ -+ contents = &state->contents[state->contents_flip]; -+ -+ long ccol, crow; -+ vte_terminal_get_cursor_position (terminal, &ccol, &crow); -+ if (ccol == contents->cached_caret_column && crow == contents->cached_caret_row) { -+ return; -+ } -+ -+ _vte_debug_print (VTE_DEBUG_ALLY, "Cursor at (%ld, " "%ld).\n", ccol, crow); -+ -+ contents->cached_caret_column = ccol; -+ contents->cached_caret_row = crow; -+ contents->caret = vte_accessible_text_contents_find_caret (contents, ccol, crow); -+ -+ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); -+} -+ -+static void -+vte_accessible_text_window_title_changed (VteTerminal *terminal, -+ VteAccessibleText *state) -+{ -+ const char *window_title; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ -+ window_title = vte_terminal_get_window_title (terminal); -+ -+ gtk_accessible_update_property (GTK_ACCESSIBLE (terminal), -+ GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, window_title ? window_title : "", -+ GTK_ACCESSIBLE_VALUE_UNDEFINED); -+} -+ -+static void -+vte_accessible_text_selection_changed (VteTerminal *terminal, -+ VteAccessibleText *state) -+{ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ -+ gtk_accessible_text_update_caret_position (GTK_ACCESSIBLE_TEXT (terminal)); -+ gtk_accessible_text_update_selection_bound (GTK_ACCESSIBLE_TEXT (terminal)); -+} -+ -+void -+_vte_accessible_text_init (GtkAccessibleText *accessible) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state; -+ -+ state = g_new0 (VteAccessibleText, 1); -+ state->terminal = terminal; -+ -+ vte_accessible_text_contents_init (&state->contents[0]); -+ vte_accessible_text_contents_init (&state->contents[1]); -+ -+ g_object_set_data_full (G_OBJECT (terminal), -+ "VTE_ACCESSIBLE_TEXT", -+ state, -+ (GDestroyNotify)vte_accessible_text_free); -+ -+ g_signal_connect (terminal, -+ "contents-changed", -+ G_CALLBACK (vte_accessible_text_contents_changed), -+ state); -+ g_signal_connect (terminal, -+ "cursor-moved", -+ G_CALLBACK (vte_accessible_text_cursor_moved), -+ state); -+ g_signal_connect (terminal, -+ "selection-changed", -+ G_CALLBACK (vte_accessible_text_selection_changed), -+ state); -+ g_signal_connect (terminal, -+ "window-title-changed", -+ G_CALLBACK (vte_accessible_text_window_title_changed), -+ state); -+ -+ const char *window_title = vte_terminal_get_window_title (terminal); -+ -+ gtk_accessible_update_property (GTK_ACCESSIBLE (accessible), -+ GTK_ACCESSIBLE_PROPERTY_DESCRIPTION, window_title ? window_title : "", -+ GTK_ACCESSIBLE_PROPERTY_HAS_POPUP, TRUE, -+ GTK_ACCESSIBLE_PROPERTY_LABEL, "Terminal", -+ GTK_ACCESSIBLE_PROPERTY_MULTI_LINE, TRUE, -+ GTK_ACCESSIBLE_VALUE_UNDEFINED); -+} -diff --git a/src/vteaccess-gtk4.h b/src/vteaccess-gtk4.h -new file mode 100644 -index 00000000..37b09c7b ---- /dev/null -+++ b/src/vteaccess-gtk4.h -@@ -0,0 +1,25 @@ -+/* -+ * Copyright © 2024 Christian Hergert -+ * -+ * This library is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU Lesser General Public License as published -+ * by the Free Software Foundation, either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public License -+ * along with this library. If not, see . -+ */ -+ -+#include -+ -+G_BEGIN_DECLS -+ -+void _vte_accessible_text_iface_init (GtkAccessibleTextInterface *iface); -+void _vte_accessible_text_init (GtkAccessibleText *accessible); -+ -+G_END_DECLS -diff --git a/src/vteaccess.cc b/src/vteaccess.cc -index fff918dc..c1c1a4c0 100644 ---- a/src/vteaccess.cc -+++ b/src/vteaccess.cc -@@ -386,6 +386,12 @@ _vte_terminal_accessible_text_modified(VteTerminalAccessible* accessible) - glong offset, caret_offset, olen, clen; - gint old_snapshot_caret; - -+ auto widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(accessible)); -+ auto terminal = VTE_TERMINAL(widget); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ - old_snapshot_caret = priv->snapshot_caret; - priv->snapshot_contents_invalid = TRUE; - vte_terminal_accessible_update_private_data_if_needed(accessible, -@@ -541,6 +547,9 @@ _vte_terminal_accessible_text_scrolled(VteTerminalAccessible* accessible, - auto widget = gtk_accessible_get_widget(GTK_ACCESSIBLE(accessible)); - auto terminal = VTE_TERMINAL(widget); - -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ - row_count = vte_terminal_get_row_count(terminal); - if (((howmuch < 0) && (howmuch <= -row_count)) || - ((howmuch > 0) && (howmuch >= row_count))) { -@@ -793,6 +802,9 @@ vte_terminal_accessible_invalidate_cursor(VteTerminal *terminal, gpointer data) - VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; - VteTerminalAccessiblePrivate *priv = (VteTerminalAccessiblePrivate *)_vte_terminal_accessible_get_instance_private(accessible); - -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ - _vte_debug_print(VTE_DEBUG_ALLY, - "Invalidating accessibility cursor.\n"); - priv->snapshot_caret_invalid = TRUE; -@@ -807,6 +819,9 @@ vte_terminal_accessible_title_changed(VteTerminal *terminal, gpointer data) - { - VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; - -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ - atk_object_set_description(ATK_OBJECT(accessible), vte_terminal_get_window_title(terminal)); - } - -@@ -820,6 +835,9 @@ vte_terminal_accessible_visibility_notify(VteTerminal *terminal, - GtkWidget *widget; - gboolean visible; - -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return FALSE; -+ - visible = event->state != GDK_VISIBILITY_FULLY_OBSCURED; - /* The VISIBLE state indicates that this widget is "visible". */ - atk_object_notify_state_change(ATK_OBJECT(accessible), -@@ -851,6 +869,9 @@ vte_terminal_accessible_selection_changed (VteTerminal *terminal, - { - VteTerminalAccessible *accessible = (VteTerminalAccessible *)data; - -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ - g_signal_emit_by_name (accessible, "text_selection_changed"); - } - -diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index c713a95a..6ece18e9 100644 ---- a/src/vtegtk.cc -+++ b/src/vtegtk.cc -@@ -65,9 +65,11 @@ - #include - - #if WITH_A11Y --#if VTE_GTK == 3 --#include "vteaccess.h" --#endif /* VTE_GTK == 3 */ -+# if VTE_GTK == 3 -+# include "vteaccess.h" -+# elif VTE_GTK == 4 -+# include "vteaccess-gtk4.h" -+# endif - #endif /* WITH_A11Y */ - - #if WITH_ICU -@@ -155,6 +157,14 @@ private: - std::shared_ptr m_widget; - }; - -+#if defined(WITH_A11Y) && VTE_GTK == 4 -+# define VTE_IMPLEMENT_ACCESSIBLE \ -+ G_IMPLEMENT_INTERFACE(GTK_TYPE_ACCESSIBLE_TEXT, \ -+ _vte_accessible_text_iface_init) -+#else -+# define VTE_IMPLEMENT_ACCESSIBLE -+#endif -+ - #if VTE_DEBUG - G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, - { -@@ -163,6 +173,7 @@ G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, - } - g_type_add_class_private (g_define_type_id, sizeof (VteTerminalClassPrivate)); - G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr) -+ VTE_IMPLEMENT_ACCESSIBLE - if (_vte_debug_on(VTE_DEBUG_LIFECYCLE)) { - g_printerr("vte_terminal_get_type()\n"); - }) -@@ -173,7 +184,8 @@ G_DEFINE_TYPE_WITH_CODE(VteTerminal, vte_terminal, GTK_TYPE_WIDGET, - g_type_add_instance_private(g_define_type_id, sizeof(VteTerminalPrivate)); - } - g_type_add_class_private (g_define_type_id, sizeof (VteTerminalClassPrivate)); -- G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr)) -+ G_IMPLEMENT_INTERFACE(GTK_TYPE_SCROLLABLE, nullptr) -+ VTE_IMPLEMENT_ACCESSIBLE) - #endif - - static inline auto -@@ -901,6 +913,10 @@ try - gtk_widget_set_has_window(&terminal->widget, FALSE); - #endif - -+#if defined(WITH_A11Y) && VTE_GTK == 4 -+ _vte_accessible_text_init (GTK_ACCESSIBLE_TEXT (terminal)); -+#endif -+ - place = vte_terminal_get_instance_private(terminal); - new (place) VteTerminalPrivate{terminal}; - } -@@ -1017,6 +1033,9 @@ try - case PROP_DELETE_BINDING: - g_value_set_enum (value, widget->delete_binding()); - break; -+ case PROP_ENABLE_A11Y: -+ g_value_set_boolean (value, vte_terminal_get_enable_a11y (terminal)); -+ break; - case PROP_ENABLE_BIDI: - g_value_set_boolean (value, vte_terminal_get_enable_bidi (terminal)); - break; -@@ -1172,6 +1191,9 @@ try - case PROP_DELETE_BINDING: - vte_terminal_set_delete_binding (terminal, (VteEraseBinding)g_value_get_enum (value)); - break; -+ case PROP_ENABLE_A11Y: -+ vte_terminal_set_enable_a11y (terminal, g_value_get_boolean (value)); -+ break; - case PROP_ENABLE_BIDI: - vte_terminal_set_enable_bidi (terminal, g_value_get_boolean (value)); - break; -@@ -2286,6 +2308,22 @@ vte_terminal_class_init(VteTerminalClass *klass) - VTE_ERASE_AUTO, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); - -+ /** -+ * VteTerminal:enable-a11y: -+ * -+ * Controls whether or not a11y is enabled for the widget. -+ * -+ * Since: 0.78 -+ */ -+ pspecs[PROP_ENABLE_A11Y] = -+ g_param_spec_boolean ("enable-a11y", NULL, NULL, -+#if VTE_GTK == 3 -+ TRUE, -+#else -+ FALSE, -+#endif -+ (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); -+ - /** - * VteTerminal:enable-bidi: - * -@@ -2712,10 +2750,12 @@ vte_terminal_class_init(VteTerminalClass *klass) - err.assert_no_error(); - #endif - --#if VTE_GTK == 3 - #if WITH_A11Y -+#if VTE_GTK == 3 - /* a11y */ - gtk_widget_class_set_accessible_type(widget_class, VTE_TYPE_TERMINAL_ACCESSIBLE); -+#elif VTE_GTK == 4 -+ gtk_widget_class_set_accessible_role(widget_class, GTK_ACCESSIBLE_ROLE_TERMINAL); - #endif - #endif - } -@@ -5709,6 +5749,53 @@ catch (...) - vte::log_exception(); - } - -+/** -+ * vte_terminal_get_enable_a11y: -+ * @terminal: a #VteTerminal -+ * -+ * Checks whether the terminal communicates with a11y backends -+ * -+ * Returns: %TRUE if a11y is enabled, %FALSE if not -+ * -+ * Since: 0.78 -+ */ -+gboolean -+vte_terminal_get_enable_a11y(VteTerminal *terminal) noexcept -+try -+{ -+ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), false); -+ return IMPL(terminal)->m_enable_a11y; -+} -+catch (...) -+{ -+ vte::log_exception(); -+ return false; -+} -+ -+/** -+ * vte_terminal_set_enable_a11y: -+ * @terminal: a #VteTerminal -+ * @enable_a11y: %TRUE to enable a11y support -+ * -+ * Controls whether or not the terminal will communicate with a11y backends. -+ * -+ * Since: 0.78 -+ */ -+void -+vte_terminal_set_enable_a11y(VteTerminal *terminal, -+ gboolean enable_a11y) noexcept -+try -+{ -+ g_return_if_fail(VTE_IS_TERMINAL(terminal)); -+ -+ if (IMPL(terminal)->set_enable_a11y(enable_a11y != FALSE)) -+ g_object_notify_by_pspec(G_OBJECT(terminal), pspecs[PROP_ENABLE_A11Y]); -+} -+catch (...) -+{ -+ vte::log_exception(); -+} -+ - /** - * vte_terminal_get_enable_bidi: - * @terminal: a #VteTerminal -diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 566c8508..87259680 100644 ---- a/src/vtegtk.hh -+++ b/src/vtegtk.hh -@@ -80,6 +80,7 @@ enum { - PROP_CURRENT_DIRECTORY_URI, - PROP_CURRENT_FILE_URI, - PROP_DELETE_BINDING, -+ PROP_ENABLE_A11Y, - PROP_ENABLE_BIDI, - PROP_ENABLE_FALLBACK_SCROLLING, - PROP_ENABLE_SHAPING, -diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 07a9e993..6e2c2e7f 100644 ---- a/src/vteinternal.hh -+++ b/src/vteinternal.hh -@@ -799,6 +799,13 @@ public: - const char *m_hyperlink_hover_uri; /* data is owned by the ring */ - long m_hyperlink_auto_id{0}; - -+ /* Accessibility support */ -+#if VTE_GTK == 3 -+ bool m_enable_a11y{true}; -+#elif VTE_GTK == 4 -+ bool m_enable_a11y{false}; -+#endif -+ - /* RingView and friends */ - vte::base::RingView m_ringview; - bool m_enable_bidi{true}; -@@ -1528,6 +1535,7 @@ public: - bool set_cursor_style(CursorStyle style); - bool set_delete_binding(EraseMode binding); - auto delete_binding() const noexcept { return m_delete_binding; } -+ bool set_enable_a11y(bool setting); - bool set_enable_bidi(bool setting); - bool set_enable_shaping(bool setting); - bool set_encoding(char const* codeset, --- -2.43.1 - diff --git a/0001-add-notification-and-shell-precmd-preexec.patch b/0001-add-notification-and-shell-precmd-preexec.patch deleted file mode 100644 index ffc02b2..0000000 --- a/0001-add-notification-and-shell-precmd-preexec.patch +++ /dev/null @@ -1,533 +0,0 @@ -From f31af265a19a406cd193a82b96dff1dd2e4595b4 Mon Sep 17 00:00:00 2001 -From: Christian Hergert -Date: Mon, 4 Mar 2024 14:03:38 -0800 -Subject: [PATCH] add notification and shell precmd/preexec - -This is a bit simpler to manage as a single patch rather than a series of -patches which incrementally update things. - -This alters some of the original patches so that we don't need to have -such careful integration with the vtable of the class as that isn't used. - -You can always connect to the signal rather than the vtable default func. ---- - src/marshal.list | 1 + - src/vte.cc | 28 +++++++++ - src/vte.sh.in | 7 ++- - src/vte/vteterminal.h | 4 ++ - src/vtegtk.cc | 131 ++++++++++++++++++++++++++++++++++++++++++ - src/vtegtk.hh | 5 ++ - src/vteinternal.hh | 26 +++++++++ - src/vteseq.cc | 123 ++++++++++++++++++++++++++++++++++++++- - 8 files changed, 322 insertions(+), 3 deletions(-) - -diff --git a/src/marshal.list b/src/marshal.list -index 241128c3..f9b3818f 100644 ---- a/src/marshal.list -+++ b/src/marshal.list -@@ -1,3 +1,4 @@ - VOID:STRING,BOXED - VOID:STRING,UINT -+VOID:STRING,STRING - VOID:UINT,UINT -diff --git a/src/vte.cc b/src/vte.cc -index 2cba7369..a8a0e22c 100644 ---- a/src/vte.cc -+++ b/src/vte.cc -@@ -10771,6 +10771,34 @@ Terminal::emit_pending_signals() - - emit_adjustment_changed(); - -+ if (m_pending_changes & vte::to_integral(PendingChanges::NOTIFICATION)) { -+ _vte_debug_print (VTE_DEBUG_SIGNALS, -+ "Emitting `notification-received'.\n"); -+ g_signal_emit(freezer.get(), signals[SIGNAL_NOTIFICATION_RECEIVED], 0, -+ m_notification_summary.c_str(), -+ m_notification_body.c_str()); -+ } -+ -+ if (m_pending_changes & vte::to_integral(PendingChanges::SHELL_PREEXEC)) { -+ _vte_debug_print (VTE_DEBUG_SIGNALS, -+ "Emitting `shell-preexec'.\n"); -+ g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PREEXEC], 0); -+ } -+ -+ if (m_pending_changes & vte::to_integral(PendingChanges::SHELL_PRECMD)) { -+ _vte_debug_print (VTE_DEBUG_SIGNALS, -+ "Emitting `shell-precmd'.\n"); -+ g_signal_emit(freezer.get(), signals[SIGNAL_SHELL_PRECMD], 0); -+ } -+ -+ if (m_pending_changes & vte::to_integral(PendingChanges::CONTAINERS)) { -+ _vte_debug_print(VTE_DEBUG_SIGNALS, -+ "Notifying `current-container-name' and `current-container-runtime'.\n"); -+ -+ g_object_notify_by_pspec(freezer.get(), pspecs[PROP_CURRENT_CONTAINER_NAME]); -+ g_object_notify_by_pspec(freezer.get(), pspecs[PROP_CURRENT_CONTAINER_RUNTIME]); -+ } -+ - if (m_pending_changes & vte::to_integral(PendingChanges::TITLE)) { - if (m_window_title != m_window_title_pending) { - m_window_title.swap(m_window_title_pending); -diff --git a/src/vte.sh.in b/src/vte.sh.in -index 2328a9ec..93f45ea8 100644 ---- a/src/vte.sh.in -+++ b/src/vte.sh.in -@@ -28,6 +28,12 @@ case "$TERM" in - *) return 0 ;; - esac - -+__vte_shell_precmd() { -+ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//') -+ command="${command//;/ }" -+ printf '\033]777;notify;Command completed;%s\033\\\033]777;precmd\033\\' "${command}" -+} -+ - __vte_osc7 () { - printf "\033]7;file://%s%s\033\\" "${HOSTNAME}" "$(@libexecdir@/vte-urlencode-cwd)" - } -@@ -37,6 +43,7 @@ __vte_prompt_command() { - [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} - pwd="${pwd//[[:cntrl:]]}" - printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${pwd}" -+ __vte_shell_precmd - __vte_osc7 - } - -@@ -49,9 +56,12 @@ if [[ -n "${BASH_VERSION:-}" ]]; then - # use the __vte_prompt_command function which also sets the title. - - if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then -+ PROMPT_COMMAND+=(__vte_shell_precmd) - PROMPT_COMMAND+=(__vte_osc7) -+ PS0=$(printf "\033]777;preexec\033\\") - else - PROMPT_COMMAND="__vte_prompt_command" -+ PS0=$(printf "\033]777;preexec\033\\") - fi - - # Shell integration -diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h -index a9e1e494..9c2e2dae 100644 ---- a/src/vte/vteterminal.h -+++ b/src/vte/vteterminal.h -@@ -559,6 +559,10 @@ glong vte_terminal_get_column_count(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VT - _VTE_PUBLIC - const char *vte_terminal_get_window_title(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); - _VTE_PUBLIC -+const char *vte_terminal_get_current_container_name(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+_VTE_PUBLIC -+const char *vte_terminal_get_current_container_runtime(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -+_VTE_PUBLIC - const char *vte_terminal_get_current_directory_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); - _VTE_PUBLIC - const char *vte_terminal_get_current_file_uri(VteTerminal *terminal) _VTE_CXX_NOEXCEPT _VTE_GNUC_NONNULL(1); -diff --git a/src/vtegtk.cc b/src/vtegtk.cc -index 92eb6881..c713a95a 100644 ---- a/src/vtegtk.cc -+++ b/src/vtegtk.cc -@@ -999,6 +999,12 @@ try - case PROP_CURSOR_BLINK_MODE: - g_value_set_enum (value, vte_terminal_get_cursor_blink_mode (terminal)); - break; -+ case PROP_CURRENT_CONTAINER_NAME: -+ g_value_set_string (value, vte_terminal_get_current_container_name (terminal)); -+ break; -+ case PROP_CURRENT_CONTAINER_RUNTIME: -+ g_value_set_string (value, vte_terminal_get_current_container_runtime (terminal)); -+ break; - case PROP_CURRENT_DIRECTORY_URI: - g_value_set_string (value, vte_terminal_get_current_directory_uri (terminal)); - break; -@@ -1434,6 +1440,60 @@ vte_terminal_class_init(VteTerminalClass *klass) - G_OBJECT_CLASS_TYPE(klass), - g_cclosure_marshal_VOID__INTv); - -+ /** -+ * VteTerminal::notification-received: -+ * @vteterminal: the object which received the signal -+ * @summary: The summary -+ * @body: (allow-none): Extra optional text -+ * -+ * Emitted when a process running in the terminal wants to -+ * send a notification to the desktop environment. -+ */ -+ signals[SIGNAL_NOTIFICATION_RECEIVED] = -+ g_signal_new(I_("notification-received"), -+ G_OBJECT_CLASS_TYPE(klass), -+ G_SIGNAL_RUN_LAST, -+ 0, -+ NULL, -+ NULL, -+ _vte_marshal_VOID__STRING_STRING, -+ G_TYPE_NONE, -+ 2, G_TYPE_STRING, G_TYPE_STRING); -+ -+ /** -+ * VteTerminal::shell-precmd: -+ * @vteterminal: the object which received the signal -+ * -+ * Emitted right before an interactive shell shows a -+ * first-level prompt. -+ */ -+ signals[SIGNAL_SHELL_PRECMD] = -+ g_signal_new(I_("shell-precmd"), -+ G_OBJECT_CLASS_TYPE(klass), -+ G_SIGNAL_RUN_LAST, -+ 0, -+ NULL, -+ NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ -+ /** -+ * VteTerminal::shell-preexec: -+ * @vteterminal: the object which received the signal -+ * -+ * Emitted when the interactive shell has read in a complete -+ * command and is about to execute it. -+ */ -+ signals[SIGNAL_SHELL_PREEXEC] = -+ g_signal_new(I_("shell-preexec"), -+ G_OBJECT_CLASS_TYPE(klass), -+ G_SIGNAL_RUN_LAST, -+ 0, -+ NULL, -+ NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ - /** - * VteTerminal::window-title-changed: - * @vteterminal: the object which received the signal -@@ -2487,6 +2547,27 @@ vte_terminal_class_init(VteTerminalClass *klass) - NULL, - (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); - -+ /** -+ * VteTerminal:current-container-name: -+ * -+ * The name of the current container, or %NULL if unset. -+ */ -+ pspecs[PROP_CURRENT_CONTAINER_NAME] = -+ g_param_spec_string ("current-container-name", NULL, NULL, -+ NULL, -+ (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); -+ -+ /** -+ * VteTerminal:current-container-runtime: -+ * -+ * The name of the runtime toolset used to set up the current -+ * container, or %NULL if unset. -+ */ -+ pspecs[PROP_CURRENT_CONTAINER_RUNTIME] = -+ g_param_spec_string ("current-container-runtime", NULL, NULL, -+ NULL, -+ (GParamFlags) (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY)); -+ - /** - * VteTerminal:current-directory-uri: - * -@@ -5419,6 +5500,56 @@ catch (...) - return -1; - } - -+/** -+ * vte_terminal_get_current_container_name: -+ * @terminal: a #VteTerminal -+ * -+ * Returns: (nullable) (transfer none): the name of the current -+ * container, or %NULL -+ */ -+const char * -+vte_terminal_get_current_container_name(VteTerminal *terminal) noexcept -+try -+{ -+ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL); -+ auto impl = IMPL(terminal); -+ if (impl->m_containers.empty()) -+ return NULL; -+ -+ const VteContainer &container = impl->m_containers.top(); -+ return container.m_name.c_str(); -+} -+catch (...) -+{ -+ vte::log_exception(); -+ return NULL; -+} -+ -+/** -+ * vte_terminal_get_current_container_runtime: -+ * @terminal: a #VteTerminal -+ * -+ * Returns: (nullable) (transfer none): the name of the runtime -+ * toolset used to set up the current container, or %NULL -+ */ -+const char * -+vte_terminal_get_current_container_runtime(VteTerminal *terminal) noexcept -+try -+{ -+ g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL); -+ auto impl = IMPL(terminal); -+ if (impl->m_containers.empty()) -+ return NULL; -+ -+ const VteContainer &container = impl->m_containers.top(); -+ return container.m_runtime.c_str(); -+} -+catch (...) -+{ -+ vte::log_exception(); -+ return NULL; -+} -+ - /** - * vte_terminal_get_current_directory_uri: - * @terminal: a #VteTerminal -diff --git a/src/vtegtk.hh b/src/vtegtk.hh -index 1d1383af..566c8508 100644 ---- a/src/vtegtk.hh -+++ b/src/vtegtk.hh -@@ -53,6 +53,9 @@ enum { - SIGNAL_RESTORE_WINDOW, - SIGNAL_SELECTION_CHANGED, - SIGNAL_SETUP_CONTEXT_MENU, -+ SIGNAL_SHELL_PRECMD, -+ SIGNAL_SHELL_PREEXEC, -+ SIGNAL_NOTIFICATION_RECEIVED, - SIGNAL_WINDOW_TITLE_CHANGED, - LAST_SIGNAL - }; -@@ -72,6 +75,8 @@ enum { - PROP_CONTEXT_MENU, - PROP_CURSOR_BLINK_MODE, - PROP_CURSOR_SHAPE, -+ PROP_CURRENT_CONTAINER_NAME, -+ PROP_CURRENT_CONTAINER_RUNTIME, - PROP_CURRENT_DIRECTORY_URI, - PROP_CURRENT_FILE_URI, - PROP_DELETE_BINDING, -diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index ed57ad16..07a9e993 100644 ---- a/src/vteinternal.hh -+++ b/src/vteinternal.hh -@@ -63,6 +63,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -121,6 +122,18 @@ typedef enum _VteCharacterReplacement { - VTE_CHARACTER_REPLACEMENT_LINE_DRAWING - } VteCharacterReplacement; - -+struct VteContainer { -+public: -+ VteContainer(const std::string &name, const std::string &runtime) : -+ m_name{name}, -+ m_runtime{runtime} -+ { -+ } -+ -+ std::string m_name; -+ std::string m_runtime; -+}; -+ - typedef struct _VtePaletteColor { - struct { - vte::color::rgb color; -@@ -710,6 +723,12 @@ public: - gboolean m_cursor_moved_pending; - gboolean m_contents_changed_pending; - -+ /* desktop notification */ -+ std::stack m_containers; -+ -+ std::string m_notification_summary; -+ std::string m_notification_body; -+ - std::string m_window_title{}; - std::string m_current_directory_uri{}; - std::string m_current_file_uri{}; -@@ -723,6 +742,10 @@ public: - TITLE = 1u << 0, - CWD = 1u << 1, - CWF = 1u << 2, -+ NOTIFICATION = 1u << 4, -+ SHELL_PREEXEC = 1u << 5, -+ SHELL_PRECMD = 1u << 6, -+ CONTAINERS = 1u << 7, - }; - unsigned m_pending_changes{0}; - -@@ -1654,6 +1677,9 @@ public: - int osc) noexcept; - - /* OSC handlers */ -+ void handle_urxvt_extension(vte::parser::Sequence const& seq, -+ vte::parser::StringTokeniser::const_iterator& token, -+ vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept; - void set_color(vte::parser::Sequence const& seq, - vte::parser::StringTokeniser::const_iterator& token, - vte::parser::StringTokeniser::const_iterator const& endtoken, -diff --git a/src/vteseq.cc b/src/vteseq.cc -index 904837e1..26f7b0d6 100644 ---- a/src/vteseq.cc -+++ b/src/vteseq.cc -@@ -39,6 +39,9 @@ - #define ST_C0 _VTE_CAP_ST - - #include -+#include -+#include -+#include - - using namespace std::literals; - -@@ -1276,6 +1279,121 @@ Terminal::erase_in_line(vte::parser::Sequence const& seq) - m_text_deleted_flag = TRUE; - } - -+void -+Terminal::handle_urxvt_extension(vte::parser::Sequence const& seq, -+ vte::parser::StringTokeniser::const_iterator& token, -+ vte::parser::StringTokeniser::const_iterator const& endtoken) noexcept -+{ -+ if (token == endtoken) -+ return; -+ -+ if (*token == "container") { -+ ++token; -+ -+ if (token == endtoken) -+ return; -+ -+ const std::string sub_command = *token; -+ ++token; -+ -+ if (sub_command == "pop") { -+ if (token == endtoken) -+ return; -+ -+ ++token; -+ -+ if (token == endtoken) -+ return; -+ -+ ++token; -+ -+ if (token == endtoken) { -+ if (!m_containers.empty()) { -+ m_containers.pop(); -+ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); -+ } -+ -+ return; -+ } -+ -+ const std::string uid_token = *token; -+ ++token; -+ -+ const uid_t uid = getuid(); -+ const std::string uid_str = std::to_string(uid); -+ -+ if (uid_token == uid_str) { -+ if (!m_containers.empty()) { -+ m_containers.pop(); -+ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); -+ } -+ -+ return; -+ } -+ -+ return; -+ } else if (sub_command == "push") { -+ if (token == endtoken) -+ return; -+ -+ const std::string name = *token; -+ ++token; -+ -+ if (token == endtoken) -+ return; -+ -+ const std::string runtime = *token; -+ ++token; -+ -+ if (token == endtoken) { -+ m_containers.emplace(name, runtime); -+ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); -+ return; -+ } -+ -+ const std::string uid_token = *token; -+ ++token; -+ -+ const uid_t uid = getuid(); -+ const std::string uid_str = std::to_string(uid); -+ -+ if (uid_token == uid_str) { -+ m_containers.emplace(name, runtime); -+ m_pending_changes |= vte::to_integral(PendingChanges::CONTAINERS); -+ return; -+ } -+ -+ return; -+ } -+ -+ return; -+ } -+ -+ if (*token == "notify") { -+ ++token; -+ -+ if (token == endtoken) -+ return; -+ -+ m_notification_summary = *token; -+ m_notification_body.clear(); -+ m_pending_changes |= vte::to_integral(PendingChanges::NOTIFICATION); -+ ++token; -+ -+ if (token == endtoken) -+ return; -+ -+ m_notification_body = *token; -+ return; -+ } -+ -+ if (*token == "precmd") { -+ m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PRECMD); -+ } else if (*token == "preexec") { -+ m_pending_changes |= vte::to_integral(PendingChanges::SHELL_PREEXEC); -+ } -+} -+ - bool - Terminal::get_osc_color_index(int osc, - int value, -@@ -6596,6 +6714,10 @@ Terminal::OSC(vte::parser::Sequence const& seq) - reset_color(VTE_HIGHLIGHT_FG, VTE_COLOR_SOURCE_ESCAPE); - break; - -+ case VTE_OSC_URXVT_EXTENSION: -+ handle_urxvt_extension(seq, it, cend); -+ break; -+ - case VTE_OSC_XTERM_SET_ICON_TITLE: - case VTE_OSC_XTERM_SET_XPROPERTY: - case VTE_OSC_XTERM_SET_COLOR_MOUSE_CURSOR_FG: -@@ -6636,7 +6758,6 @@ Terminal::OSC(vte::parser::Sequence const& seq) - case VTE_OSC_URXVT_SET_FONT_BOLD_ITALIC: - case VTE_OSC_URXVT_VIEW_UP: - case VTE_OSC_URXVT_VIEW_DOWN: -- case VTE_OSC_URXVT_EXTENSION: - case VTE_OSC_YF_RQGWR: - default: - break; --- -2.43.1 - diff --git a/sources b/sources index d612df3..fa7f814 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.76.3.tar.xz) = 59cf3241f59b7ce795098814a04816d150330e4464a2438c974ac03cfd6aa05e7e037121a6a21929d6b12eb17fb1a4bf48c936604f0e0b770e3f125adb5a4c50 +SHA512 (vte-0.77.0.tar.bz2) = de82ca7a94d06efa61cfcd9ef3b88e9c6877c8049e05248c9e1f6ee22d80ac71558d102c034fef5437c3adde460a77e669fbc67d56ec197f33a2eee545e2a8b0 diff --git a/vte.sh-forward-port-notify-prexec-precmd.patch b/vte.sh-forward-port-notify-prexec-precmd.patch new file mode 100644 index 0000000..e9f7d97 --- /dev/null +++ b/vte.sh-forward-port-notify-prexec-precmd.patch @@ -0,0 +1,50 @@ +From 2b4049e1ecb47e41a4cc3eec58d22a02f14cfca5 Mon Sep 17 00:00:00 2001 +From: Christian Hergert +Date: Mon, 24 Jun 2024 12:53:35 -0700 +Subject: [PATCH 2/2] vte.sh: forward-port notify/prexec/precmd + +This brings forward the patches Fedora previously had to notify of the +command with precmd/preexec. They currently only affect bash. +--- + src/vte.sh.in | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/vte.sh.in b/src/vte.sh.in +index 2328a9ec..40cacd4f 100644 +--- a/src/vte.sh.in ++++ b/src/vte.sh.in +@@ -32,11 +32,18 @@ __vte_osc7 () { + printf "\033]7;file://%s%s\033\\" "${HOSTNAME}" "$(@libexecdir@/vte-urlencode-cwd)" + } + ++__vte_shell_precmd() { ++ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//') ++ command="${command//;/ }" ++ printf '\033]777;notify;Command completed;%s\033\\\033]777;precmd\033\\' "${command}" ++} ++ + __vte_prompt_command() { + local pwd='~' + [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} + pwd="${pwd//[[:cntrl:]]}" + printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${pwd}" ++ __vte_shell_precmd + __vte_osc7 + } + +@@ -49,9 +56,12 @@ if [[ -n "${BASH_VERSION:-}" ]]; then + # use the __vte_prompt_command function which also sets the title. + + if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then ++ PROMPT_COMMAND+=(__vte_shell_precmd) + PROMPT_COMMAND+=(__vte_osc7) ++ PS0=$(printf "\033]777;preexec\033\\") + else + PROMPT_COMMAND="__vte_prompt_command" ++ PS0=$(printf "\033]777;preexec\033\\") + fi + + # Shell integration +-- +2.45.1 + diff --git a/vte291.spec b/vte291.spec index ed3cba8..453a913 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,21 +11,20 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.76.3 -Release: 2%{?dist} -Summary: GTK+ 3 terminal emulator library +Version: 0.77.0 +Release: 1%{?dist} +Summary: GTK terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.76/vte-%{version}.tar.xz +Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 # https://bugzilla.gnome.org/show_bug.cgi?id=711059 # https://bugzilla.redhat.com/show_bug.cgi?id=1103380 # https://pagure.io/fedora-workstation/issue/216 -Patch: 0001-a11y-implement-GtkAccessibleText.patch -Patch: 0001-add-notification-and-shell-precmd-preexec.patch +Patch: vte.sh-forward-port-notify-prexec-precmd.patch BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -139,6 +138,7 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %license COPYING.LGPL3 %license COPYING.XTERM %doc README.md +%{_datadir}/vte-%{apiver}/ %{_libdir}/libvte-%{apiver}.so.0* %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Vte-2.91.typelib @@ -180,6 +180,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Jul 24 2024 David King - 0.77.0-1 +- Update to 0.77.0 + * Sat Jul 20 2024 Fedora Release Engineering - 0.76.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From fa0a95d88e5b7b248f139b040eab7f70411d611e Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 8 Aug 2024 13:23:46 +0100 Subject: [PATCH 060/102] Update to 0.77.91 --- .gitignore | 1 + sources | 2 +- ...sh-forward-port-notify-prexec-precmd.patch | 50 ------------------- vte291.spec | 12 ++--- 4 files changed, 7 insertions(+), 58 deletions(-) delete mode 100644 vte.sh-forward-port-notify-prexec-precmd.patch diff --git a/.gitignore b/.gitignore index 1efe15b..e83efd5 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,4 @@ /vte-0.76.2.tar.xz /vte-0.76.3.tar.xz /vte-0.77.0.tar.bz2 +/vte-0.77.91.tar.xz diff --git a/sources b/sources index fa7f814..ddbc8c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.77.0.tar.bz2) = de82ca7a94d06efa61cfcd9ef3b88e9c6877c8049e05248c9e1f6ee22d80ac71558d102c034fef5437c3adde460a77e669fbc67d56ec197f33a2eee545e2a8b0 +SHA512 (vte-0.77.91.tar.xz) = 9aa3dd3d56fc3d7e383ebd9b14f88b217f0bf08f78de7894cc3f9fb57d22625a1cb0aa10dd2ebcc83041994732e2bc7e0cd59b215206afa05736c7715e563361 diff --git a/vte.sh-forward-port-notify-prexec-precmd.patch b/vte.sh-forward-port-notify-prexec-precmd.patch deleted file mode 100644 index e9f7d97..0000000 --- a/vte.sh-forward-port-notify-prexec-precmd.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 2b4049e1ecb47e41a4cc3eec58d22a02f14cfca5 Mon Sep 17 00:00:00 2001 -From: Christian Hergert -Date: Mon, 24 Jun 2024 12:53:35 -0700 -Subject: [PATCH 2/2] vte.sh: forward-port notify/prexec/precmd - -This brings forward the patches Fedora previously had to notify of the -command with precmd/preexec. They currently only affect bash. ---- - src/vte.sh.in | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/src/vte.sh.in b/src/vte.sh.in -index 2328a9ec..40cacd4f 100644 ---- a/src/vte.sh.in -+++ b/src/vte.sh.in -@@ -32,11 +32,18 @@ __vte_osc7 () { - printf "\033]7;file://%s%s\033\\" "${HOSTNAME}" "$(@libexecdir@/vte-urlencode-cwd)" - } - -+__vte_shell_precmd() { -+ local command=$(HISTTIMEFORMAT= history 1 | sed 's/^ *[0-9]\+ *//') -+ command="${command//;/ }" -+ printf '\033]777;notify;Command completed;%s\033\\\033]777;precmd\033\\' "${command}" -+} -+ - __vte_prompt_command() { - local pwd='~' - [ "$PWD" != "$HOME" ] && pwd=${PWD/#$HOME\//\~\/} - pwd="${pwd//[[:cntrl:]]}" - printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${pwd}" -+ __vte_shell_precmd - __vte_osc7 - } - -@@ -49,9 +56,12 @@ if [[ -n "${BASH_VERSION:-}" ]]; then - # use the __vte_prompt_command function which also sets the title. - - if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then -+ PROMPT_COMMAND+=(__vte_shell_precmd) - PROMPT_COMMAND+=(__vte_osc7) -+ PS0=$(printf "\033]777;preexec\033\\") - else - PROMPT_COMMAND="__vte_prompt_command" -+ PS0=$(printf "\033]777;preexec\033\\") - fi - - # Shell integration --- -2.45.1 - diff --git a/vte291.spec b/vte291.spec index 453a913..c075f59 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.77.0 +Version: 0.77.91 Release: 1%{?dist} Summary: GTK terminal emulator library @@ -19,12 +19,7 @@ Summary: GTK terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 - -# https://bugzilla.gnome.org/show_bug.cgi?id=711059 -# https://bugzilla.redhat.com/show_bug.cgi?id=1103380 -# https://pagure.io/fedora-workstation/issue/216 -Patch: vte.sh-forward-port-notify-prexec-precmd.patch +Source0: https://download.gnome.org/sources/vte/0.77/vte-%{version}.tar.xz BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -180,6 +175,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Thu Aug 08 2024 David King - 0.77.91-1 +- Update to 0.77.91 + * Wed Jul 24 2024 David King - 0.77.0-1 - Update to 0.77.0 From 8032c9d401d9b71bc463609ece2e749eed4268fc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 10 Aug 2024 14:01:37 +0800 Subject: [PATCH 061/102] fix vte.sh error: __vte_shell_precmd: command not found --- ...1614af6c50f51478ae8ecb623befa39c0ba7.patch | 28 +++++++++++++++++++ vte291.spec | 7 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 da681614af6c50f51478ae8ecb623befa39c0ba7.patch diff --git a/da681614af6c50f51478ae8ecb623befa39c0ba7.patch b/da681614af6c50f51478ae8ecb623befa39c0ba7.patch new file mode 100644 index 0000000..bd84ba2 --- /dev/null +++ b/da681614af6c50f51478ae8ecb623befa39c0ba7.patch @@ -0,0 +1,28 @@ +From da681614af6c50f51478ae8ecb623befa39c0ba7 Mon Sep 17 00:00:00 2001 +From: Christian Persch +Date: Thu, 8 Aug 2024 17:43:17 +0200 +Subject: [PATCH] vte.sh: Fix function name + +Fixes a regression from commit bbafeae5166a237df3eb832086bbf4914684cca7. + +Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2803 +--- + src/vte.sh.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vte.sh.in b/src/vte.sh.in +index 3985ef1b2..01dd063ae 100644 +--- a/src/vte.sh.in ++++ b/src/vte.sh.in +@@ -67,7 +67,7 @@ if [[ -n "${BASH_VERSION:-}" ]]; then + # use the __vte_prompt_command function which also sets the title. + + if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then +- PROMPT_COMMAND+=(__vte_shell_precmd) ++ PROMPT_COMMAND+=(__vte_precmd) + PROMPT_COMMAND+=(__vte_osc7) + PS0=$(__vte_termprop_signal "vte.shell.preexec") + else +-- +GitLab + diff --git a/vte291.spec b/vte291.spec index c075f59..0f8ca5e 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.77.91 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -20,6 +20,8 @@ License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY URL: https://wiki.gnome.org/Apps/Terminal/VTE Source0: https://download.gnome.org/sources/vte/0.77/vte-%{version}.tar.xz +# https://gitlab.gnome.org/GNOME/vte/-/issues/2803 +Patch0: https://gitlab.gnome.org/GNOME/vte/-/commit/da681614af6c50f51478ae8ecb623befa39c0ba7.patch BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -175,6 +177,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sat Aug 10 2024 Jens Petersen - 0.77.91-2 +- fix vte.sh error: __vte_shell_precmd: command not found + * Thu Aug 08 2024 David King - 0.77.91-1 - Update to 0.77.91 From 01a66dbd32fce89d50aa72a8cbcb584976fb846a Mon Sep 17 00:00:00 2001 From: David King Date: Mon, 2 Sep 2024 18:58:55 +0100 Subject: [PATCH 062/102] Update to 0.77.92 --- .gitignore | 1 + ...1614af6c50f51478ae8ecb623befa39c0ba7.patch | 28 ------------------- sources | 2 +- vte291.spec | 9 ++---- 4 files changed, 5 insertions(+), 35 deletions(-) delete mode 100644 da681614af6c50f51478ae8ecb623befa39c0ba7.patch diff --git a/.gitignore b/.gitignore index e83efd5..ed9d730 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,4 @@ /vte-0.76.3.tar.xz /vte-0.77.0.tar.bz2 /vte-0.77.91.tar.xz +/vte-0.77.92.tar.bz2 diff --git a/da681614af6c50f51478ae8ecb623befa39c0ba7.patch b/da681614af6c50f51478ae8ecb623befa39c0ba7.patch deleted file mode 100644 index bd84ba2..0000000 --- a/da681614af6c50f51478ae8ecb623befa39c0ba7.patch +++ /dev/null @@ -1,28 +0,0 @@ -From da681614af6c50f51478ae8ecb623befa39c0ba7 Mon Sep 17 00:00:00 2001 -From: Christian Persch -Date: Thu, 8 Aug 2024 17:43:17 +0200 -Subject: [PATCH] vte.sh: Fix function name - -Fixes a regression from commit bbafeae5166a237df3eb832086bbf4914684cca7. - -Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/2803 ---- - src/vte.sh.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/vte.sh.in b/src/vte.sh.in -index 3985ef1b2..01dd063ae 100644 ---- a/src/vte.sh.in -+++ b/src/vte.sh.in -@@ -67,7 +67,7 @@ if [[ -n "${BASH_VERSION:-}" ]]; then - # use the __vte_prompt_command function which also sets the title. - - if [[ "$(declare -p PROMPT_COMMAND 2>&1)" =~ "declare -a" ]]; then -- PROMPT_COMMAND+=(__vte_shell_precmd) -+ PROMPT_COMMAND+=(__vte_precmd) - PROMPT_COMMAND+=(__vte_osc7) - PS0=$(__vte_termprop_signal "vte.shell.preexec") - else --- -GitLab - diff --git a/sources b/sources index ddbc8c9..2f823e0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.77.91.tar.xz) = 9aa3dd3d56fc3d7e383ebd9b14f88b217f0bf08f78de7894cc3f9fb57d22625a1cb0aa10dd2ebcc83041994732e2bc7e0cd59b215206afa05736c7715e563361 +SHA512 (vte-0.77.92.tar.bz2) = b34a8cbef9be06601f2d9d7e065a52052172fffae66435811c41e4ef5505a01cd6b9cc511f29c37d208ba52c4772e656b88b9168d8915999299121be75b92d45 diff --git a/vte291.spec b/vte291.spec index 0f8ca5e..58a797c 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,17 +11,15 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.77.91 -Release: 2%{?dist} +Version: 0.77.92 +Release: 1%{?dist} Summary: GTK terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.77/vte-%{version}.tar.xz -# https://gitlab.gnome.org/GNOME/vte/-/issues/2803 -Patch0: https://gitlab.gnome.org/GNOME/vte/-/commit/da681614af6c50f51478ae8ecb623befa39c0ba7.patch +Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -135,7 +133,6 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %license COPYING.LGPL3 %license COPYING.XTERM %doc README.md -%{_datadir}/vte-%{apiver}/ %{_libdir}/libvte-%{apiver}.so.0* %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Vte-2.91.typelib From 57f9b2f38bd6e353f0fac085bb4f1f5045986374 Mon Sep 17 00:00:00 2001 From: David King Date: Mon, 16 Sep 2024 09:20:39 +0100 Subject: [PATCH 063/102] Update to 0.78.0 --- .gitignore | 1 + sources | 2 +- vte291.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ed9d730..624ebd7 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,4 @@ /vte-0.77.0.tar.bz2 /vte-0.77.91.tar.xz /vte-0.77.92.tar.bz2 +/vte-0.78.0.tar.xz diff --git a/sources b/sources index 2f823e0..7b7476a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.77.92.tar.bz2) = b34a8cbef9be06601f2d9d7e065a52052172fffae66435811c41e4ef5505a01cd6b9cc511f29c37d208ba52c4772e656b88b9168d8915999299121be75b92d45 +SHA512 (vte-0.78.0.tar.xz) = 730f92f67cc896382c666f99f01ced4ff3192007e39a7c5701478de780df1399bdd6634c7c9300ff06df6574b1dff5af7d3d3bc1e395e9c7be311212d3bb313f diff --git a/vte291.spec b/vte291.spec index 58a797c..c812dad 100644 --- a/vte291.spec +++ b/vte291.spec @@ -1,7 +1,7 @@ %global apiver 2.91 %global fribidi_version 1.0.0 -%global glib2_version 2.52.0 +%global glib2_version 2.72.0 %global gnutls_version 3.2.7 %global gtk3_version 3.24.22 %global gtk4_version 4.14.0 @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.77.92 +Version: 0.78.0 Release: 1%{?dist} Summary: GTK terminal emulator library @@ -19,7 +19,7 @@ Summary: GTK terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://gitlab.gnome.org/GNOME/vte/-/archive/%{version}/vte-%{version}.tar.bz2 +Source0: https://download.gnome.org/sources/vte/0.78/vte-%{version}.tar.xz BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -174,6 +174,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Sep 16 2024 David King - 0.78.0-1 +- Update to 0.78.0 + * Sat Aug 10 2024 Jens Petersen - 0.77.91-2 - fix vte.sh error: __vte_shell_precmd: command not found From 18463db196816900fb214921a8d2ba7bbe875a8f Mon Sep 17 00:00:00 2001 From: nmontero Date: Tue, 22 Oct 2024 11:10:04 +0200 Subject: [PATCH 064/102] Update to 0.78.1 --- .gitignore | 1 + sources | 2 +- vte291.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 624ebd7..1632bae 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,4 @@ /vte-0.77.91.tar.xz /vte-0.77.92.tar.bz2 /vte-0.78.0.tar.xz +/vte-0.78.1.tar.xz diff --git a/sources b/sources index 7b7476a..714b0f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.78.0.tar.xz) = 730f92f67cc896382c666f99f01ced4ff3192007e39a7c5701478de780df1399bdd6634c7c9300ff06df6574b1dff5af7d3d3bc1e395e9c7be311212d3bb313f +SHA512 (vte-0.78.1.tar.xz) = e709cf1d721c8082b9758e34d7ee5a553145886719311cff25243d7bfd734002a7b7ccfb9c98870a600eda726568a11728934974a1fc31ce22072d43302bbcf1 diff --git a/vte291.spec b/vte291.spec index c812dad..98023ec 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.78.0 +Version: 0.78.1 Release: 1%{?dist} Summary: GTK terminal emulator library @@ -174,6 +174,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Tue Oct 22 2024 nmontero - 0.78.1-1 +- Update to 0.78.1 + * Mon Sep 16 2024 David King - 0.78.0-1 - Update to 0.78.0 From 88eceed35b34665194575c966c64efde27de0b09 Mon Sep 17 00:00:00 2001 From: nmontero Date: Mon, 25 Nov 2024 11:01:27 +0100 Subject: [PATCH 065/102] Update to 0.78.2 --- .gitignore | 1 + sources | 2 +- vte291.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1632bae..c53b49b 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,4 @@ /vte-0.77.92.tar.bz2 /vte-0.78.0.tar.xz /vte-0.78.1.tar.xz +/vte-0.78.2.tar.xz diff --git a/sources b/sources index 714b0f8..69932f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.78.1.tar.xz) = e709cf1d721c8082b9758e34d7ee5a553145886719311cff25243d7bfd734002a7b7ccfb9c98870a600eda726568a11728934974a1fc31ce22072d43302bbcf1 +SHA512 (vte-0.78.2.tar.xz) = 70c1e7d4bcab89a4b537d4575166c62063d6f722dd53c0970b6dcc277ff731bc05854f1ccb45d9679ad195bc31f2e7ee89cbf022109b8030bf01a2100c5dcb4e diff --git a/vte291.spec b/vte291.spec index 98023ec..8fc0333 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.78.1 +Version: 0.78.2 Release: 1%{?dist} Summary: GTK terminal emulator library @@ -174,6 +174,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Nov 25 2024 nmontero - 0.78.2-1 +- Update to 0.78.2 + * Tue Oct 22 2024 nmontero - 0.78.1-1 - Update to 0.78.1 From a58e321c2509c8c5c3236d13c69648bbc650c3e1 Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Sun, 8 Dec 2024 23:02:30 +0000 Subject: [PATCH 066/102] Rebuild for ICU 76 --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 8fc0333..957740d 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.78.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -174,6 +174,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sun Dec 08 2024 Pete Walter - 0.78.2-2 +- Rebuild for ICU 76 + * Mon Nov 25 2024 nmontero - 0.78.2-1 - Update to 0.78.2 From 78342feb2fd9dba38b0137598f0a5f43f7c41ce2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 14:39:34 +0000 Subject: [PATCH 067/102] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- vte291.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index 957740d..21c8635 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.78.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GTK terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -174,6 +174,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 0.78.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sun Dec 08 2024 Pete Walter - 0.78.2-2 - Rebuild for ICU 76 From 90bb28c7ab51d244b31741332cce8fb32abe5309 Mon Sep 17 00:00:00 2001 From: nmontero Date: Wed, 12 Feb 2025 13:45:49 +0100 Subject: [PATCH 068/102] Update to 0.79.0 --- .gitignore | 2 ++ sources | 2 +- vte291.spec | 15 ++++++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c53b49b..96fc891 100644 --- a/.gitignore +++ b/.gitignore @@ -107,3 +107,5 @@ /vte-0.78.0.tar.xz /vte-0.78.1.tar.xz /vte-0.78.2.tar.xz +/vte-0.79.90.tar.xz +/vte-0.79.0.tar.xz diff --git a/sources b/sources index 69932f0..9b5a836 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.78.2.tar.xz) = 70c1e7d4bcab89a4b537d4575166c62063d6f722dd53c0970b6dcc277ff731bc05854f1ccb45d9679ad195bc31f2e7ee89cbf022109b8030bf01a2100c5dcb4e +SHA512 (vte-0.79.0.tar.xz) = 866466883d171667638b6310059e1ed7d8f32fc53b388cbf1900087e472c79f325e7a55c3923a05c93871409938fdaf644d7d9602e65fc013e340f2c4bcc47be diff --git a/vte291.spec b/vte291.spec index 21c8635..8648050 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,15 +11,15 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.78.2 -Release: 3%{?dist} +Version: 0.79.0 +Release: 1%{?dist} Summary: GTK terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.78/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.79/vte-%{version}.tar.xz BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -33,6 +33,7 @@ BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(libpcre2-8) >= %{pcre2_version} BuildRequires: pkgconfig(libsystemd) >= %{libsystemd_version} BuildRequires: pkgconfig(pango) >= %{pango_version} +BuildRequires: fast_float-devel BuildRequires: gcc-c++ BuildRequires: gettext BuildRequires: gi-docgen @@ -137,6 +138,11 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Vte-2.91.typelib %{_userunitdir}/vte-spawn-.scope.d +%{_datadir}/vte-2.91/terminfo/x/xterm-256color +%{_datadir}/applications/vte-gtk3.desktop +%{_datadir}/xdg-terminals/vte-gtk3.desktop +%{_datadir}/applications/vte-gtk4.desktop +%{_datadir}/xdg-terminals/vte-gtk4.desktop %files gtk4 %{_libdir}/libvte-%{apiver}-gtk4.so.0* @@ -174,6 +180,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Feb 12 2025 nmontero - 0.79.90-1 +- Update to 0.79.0 + * Sun Jan 19 2025 Fedora Release Engineering - 0.78.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From f9655828a504c378cb2b1244fead1c9a7d0a8374 Mon Sep 17 00:00:00 2001 From: nmontero Date: Wed, 19 Feb 2025 10:16:01 +0100 Subject: [PATCH 069/102] Update to 0.79.90 --- sources | 2 +- vte291.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 9b5a836..14edc8e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.79.0.tar.xz) = 866466883d171667638b6310059e1ed7d8f32fc53b388cbf1900087e472c79f325e7a55c3923a05c93871409938fdaf644d7d9602e65fc013e340f2c4bcc47be +SHA512 (vte-0.79.90.tar.xz) = 1c35c74a321287c48bab520cbd8ad6ad823673d68d1ca8cea45cd3823b4121fb92f3cd860db7fdf033a614d2594d2ce1a87107b31bed08d451b2d89b03e29d2c diff --git a/vte291.spec b/vte291.spec index 8648050..dbc191a 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.79.0 +Version: 0.79.90 Release: 1%{?dist} Summary: GTK terminal emulator library @@ -180,6 +180,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Feb 19 2025 nmontero - 0.79.90-1 +- Update to 0.79.90 + * Wed Feb 12 2025 nmontero - 0.79.90-1 - Update to 0.79.0 From 52e95a76a4de125da05f9ff3f2dba7587dba4d8d Mon Sep 17 00:00:00 2001 From: nmontero Date: Wed, 5 Mar 2025 17:31:13 +0100 Subject: [PATCH 070/102] Update to 0.79.91 --- .gitignore | 1 + sources | 2 +- vte291.spec | 14 ++++++++------ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 96fc891..3c3b1ac 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,4 @@ /vte-0.78.2.tar.xz /vte-0.79.90.tar.xz /vte-0.79.0.tar.xz +/vte-0.79.91.tar.xz diff --git a/sources b/sources index 14edc8e..3434a9e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.79.90.tar.xz) = 1c35c74a321287c48bab520cbd8ad6ad823673d68d1ca8cea45cd3823b4121fb92f3cd860db7fdf033a614d2594d2ce1a87107b31bed08d451b2d89b03e29d2c +SHA512 (vte-0.79.91.tar.xz) = ce916fde3dd85f9bd37696ed1f305b0f076806c75cd1f4006396d734b3cde241a9c3fb1ac14a8922ec505ab826d4a3d34fedce7c2f1ff6772c24c41b273791ac diff --git a/vte291.spec b/vte291.spec index dbc191a..6602d71 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.79.90 +Version: 0.79.91 Release: 1%{?dist} Summary: GTK terminal emulator library @@ -138,11 +138,10 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Vte-2.91.typelib %{_userunitdir}/vte-spawn-.scope.d -%{_datadir}/vte-2.91/terminfo/x/xterm-256color -%{_datadir}/applications/vte-gtk3.desktop -%{_datadir}/xdg-terminals/vte-gtk3.desktop -%{_datadir}/applications/vte-gtk4.desktop -%{_datadir}/xdg-terminals/vte-gtk4.desktop +%{_datadir}/applications/org.gnome.Vte.App.Gtk3.desktop +%{_datadir}/applications/org.gnome.Vte.App.Gtk4.desktop +%{_datadir}/xdg-terminals/org.gnome.Vte.App.Gtk3.desktop +%{_datadir}/xdg-terminals/org.gnome.Vte.App.Gtk4.desktop %files gtk4 %{_libdir}/libvte-%{apiver}-gtk4.so.0* @@ -180,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Wed Mar 05 2025 nmontero - 0.79.91-1 +- Update to 0.79.91 + * Wed Feb 19 2025 nmontero - 0.79.90-1 - Update to 0.79.90 From ae97c886cbc450d564447f89182c497fa62fd96b Mon Sep 17 00:00:00 2001 From: nmontero Date: Mon, 17 Mar 2025 17:58:13 +0100 Subject: [PATCH 071/102] Update to 0.80.0 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3c3b1ac..b2ded89 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,4 @@ /vte-0.79.90.tar.xz /vte-0.79.0.tar.xz /vte-0.79.91.tar.xz +/vte-0.80.0.tar.xz diff --git a/sources b/sources index 3434a9e..77179a3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.79.91.tar.xz) = ce916fde3dd85f9bd37696ed1f305b0f076806c75cd1f4006396d734b3cde241a9c3fb1ac14a8922ec505ab826d4a3d34fedce7c2f1ff6772c24c41b273791ac +SHA512 (vte-0.80.0.tar.xz) = ece6f5469b99156148cd1ba266dfdc5ff8990ed71d9545fb21a7cd2ce80e85c8c799cee5c30424ec1d3cb1c40be761087f10981b4fc320f828508a537c7280a9 diff --git a/vte291.spec b/vte291.spec index 6602d71..1d05a66 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.79.91 +Version: 0.80.0 Release: 1%{?dist} Summary: GTK terminal emulator library @@ -19,7 +19,7 @@ Summary: GTK terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.79/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.80/vte-%{version}.tar.xz BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} @@ -179,6 +179,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Mar 17 2025 nmontero - 0.80.0-1 +- Update to 0.80.0 + * Wed Mar 05 2025 nmontero - 0.79.91-1 - Update to 0.79.91 From 1a02863e6076133efc38e9ce9e469010ff593c0d Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 17 Mar 2025 15:58:08 -0400 Subject: [PATCH 072/102] Avoid fast_float dependency When the default C++ standard library provides the necessary support, it should be preferred over any supplementary library. This restores the status quo for recent g++ while still supporting clang -stdlib=libc++ and older g++. https://gitlab.gnome.org/GNOME/vte/-/merge_requests/2 --- ...oat-when-std-from_chars-is-insuffici.patch | 93 +++++++++++++++++++ vte291.spec | 9 +- 2 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch diff --git a/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch b/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch new file mode 100644 index 0000000..b44c953 --- /dev/null +++ b/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch @@ -0,0 +1,93 @@ +From 39557ba02e67af3d6585da96560459bc3b922ca3 Mon Sep 17 00:00:00 2001 +From: Yaakov Selkowitz +Date: Wed, 19 Feb 2025 13:43:15 -0500 +Subject: [PATCH] Only use fast_float when std::from_chars is insufficient + +When the default C++ standard library provides the necessary support, it +should be preferred over any supplementary library. This restores the +status quo for recent g++ while still supporting clang -stdlib=libc++ and +older g++. +--- + meson.build | 25 +++++++++++++++++++++++++ + src/color-parser.cc | 4 ++++ + src/termprops.hh | 4 ++++ + 3 files changed, 33 insertions(+) + +diff --git a/meson.build b/meson.build +index 7b590c33..ab02880a 100644 +--- a/meson.build ++++ b/meson.build +@@ -675,6 +675,29 @@ config_h.set10('WITH_SYSTEMD', systemd_dep.found()) + # try compiling a test programme to see if the version is new enough. + + if cxx.compiles(''' ++ #include ++ #include ++ #include ++ ++ int main(void) { ++ auto str = "1234"; ++ auto start = str; ++ auto end = str + strlen(str); ++ auto value = uint64_t{}; ++ auto rv = std::from_chars(start, end, value, 16); ++ if (rv.ec != std::errc{} || rv.ptr != end) ++ return 2; ++ ++ return 0; ++ } ++ ''', ++ args: [ ++ cxx_std_opt, ++ ], ++ name: 'system std::from_chars usability check', ++ ) ++ fast_float_dep = dependency('', required: false) ++elif cxx.compiles(''' + #include + #include + #include +@@ -701,6 +724,8 @@ else + fast_float_dep = dependency('fast_float', required: true) + endif + ++config_h.set10('WITH_FAST_FLOAT', fast_float_dep.found()) ++ + # Write config.h + + config_sources = [ +diff --git a/src/color-parser.cc b/src/color-parser.cc +index 237b4ca7..8d205307 100644 +--- a/src/color-parser.cc ++++ b/src/color-parser.cc +@@ -29,7 +29,11 @@ + + #include + ++#if WITH_FAST_FLOAT + #include ++#else ++#define fast_float std ++#endif + + #include "color-names.hh" + +diff --git a/src/termprops.hh b/src/termprops.hh +index c9253764..0f462acb 100644 +--- a/src/termprops.hh ++++ b/src/termprops.hh +@@ -35,7 +35,11 @@ + #include + #include + ++#if WITH_FAST_FLOAT + #include ++#else ++#define fast_float std ++#endif + + namespace vte::terminal { + +-- +2.48.1 + diff --git a/vte291.spec b/vte291.spec index 1d05a66..26d342f 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.80.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -21,6 +21,9 @@ License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY URL: https://wiki.gnome.org/Apps/Terminal/VTE Source0: https://download.gnome.org/sources/vte/0.80/vte-%{version}.tar.xz +# https://gitlab.gnome.org/GNOME/vte/-/merge_requests/2 +Patch0: 0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch + BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} @@ -33,7 +36,6 @@ BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(libpcre2-8) >= %{pcre2_version} BuildRequires: pkgconfig(libsystemd) >= %{libsystemd_version} BuildRequires: pkgconfig(pango) >= %{pango_version} -BuildRequires: fast_float-devel BuildRequires: gcc-c++ BuildRequires: gettext BuildRequires: gi-docgen @@ -179,6 +181,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Mar 17 2025 Yaakov Selkowitz - 0.80.0-2 +- Avoid fast_float dependency + * Mon Mar 17 2025 nmontero - 0.80.0-1 - Update to 0.80.0 From 76d50d45e5193acee4ab1414f5cc29b9f8cb51d8 Mon Sep 17 00:00:00 2001 From: nmontero Date: Mon, 14 Apr 2025 11:03:07 +0200 Subject: [PATCH 073/102] Update to 0.80.1 --- .gitignore | 1 + sources | 2 +- vte291.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b2ded89..7fe9ed7 100644 --- a/.gitignore +++ b/.gitignore @@ -111,3 +111,4 @@ /vte-0.79.0.tar.xz /vte-0.79.91.tar.xz /vte-0.80.0.tar.xz +/vte-0.80.1.tar.xz diff --git a/sources b/sources index 77179a3..8278986 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.80.0.tar.xz) = ece6f5469b99156148cd1ba266dfdc5ff8990ed71d9545fb21a7cd2ce80e85c8c799cee5c30424ec1d3cb1c40be761087f10981b4fc320f828508a537c7280a9 +SHA512 (vte-0.80.1.tar.xz) = b84764f82f3b5fe9726686175f9e54c5e49a58e6793dff243019eec918920fe2e1ba1afb82861e594d0b1add9dd81a5f0b9e5b38f1b01b4ca4b066695fb58c83 diff --git a/vte291.spec b/vte291.spec index 26d342f..55b2113 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,8 +11,8 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.80.0 -Release: 2%{?dist} +Version: 0.80.1 +Release: 1%{?dist} Summary: GTK terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -181,6 +181,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon Apr 14 2025 nmontero - 0.80.1-1 +- Update to 0.80.1 + * Mon Mar 17 2025 Yaakov Selkowitz - 0.80.0-2 - Avoid fast_float dependency From efc995a8eabdc85789f3331487ba397dc06686c7 Mon Sep 17 00:00:00 2001 From: nmontero Date: Mon, 26 May 2025 10:07:42 +0200 Subject: [PATCH 074/102] Update to 0.80.2 --- .gitignore | 1 + sources | 2 +- vte291.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7fe9ed7..2a8358a 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,4 @@ /vte-0.79.91.tar.xz /vte-0.80.0.tar.xz /vte-0.80.1.tar.xz +/vte-0.80.2.tar.xz diff --git a/sources b/sources index 8278986..a8d6ce3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.80.1.tar.xz) = b84764f82f3b5fe9726686175f9e54c5e49a58e6793dff243019eec918920fe2e1ba1afb82861e594d0b1add9dd81a5f0b9e5b38f1b01b4ca4b066695fb58c83 +SHA512 (vte-0.80.2.tar.xz) = 6ff5dc8971279b3cb035f0b70a2c13b06f97cea840e117c4fa0273ec491a00ed4475abc4b84e91b5536d85714b6f751092a2652027df477d746fe66f407a2de2 diff --git a/vte291.spec b/vte291.spec index 55b2113..a89950b 100644 --- a/vte291.spec +++ b/vte291.spec @@ -11,7 +11,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.80.1 +Version: 0.80.2 Release: 1%{?dist} Summary: GTK terminal emulator library @@ -181,6 +181,9 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog +* Mon May 26 2025 nmontero - 0.80.2-1 +- Update to 0.80.2 + * Mon Apr 14 2025 nmontero - 0.80.1-1 - Update to 0.80.1 From 160b62dd69964cd20f4d19d1013f49ff2e45d1c9 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Fri, 6 Jun 2025 17:08:51 -0500 Subject: [PATCH 075/102] Port to rpm-autospec --- changelog | 535 +++++++++++++++++++++++++++++++++++++++++++++++++++ vte291.spec | 538 +--------------------------------------------------- 2 files changed, 537 insertions(+), 536 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..b2a034c --- /dev/null +++ b/changelog @@ -0,0 +1,535 @@ +* Mon May 26 2025 nmontero - 0.80.2-1 +- Update to 0.80.2 + +* Mon Apr 14 2025 nmontero - 0.80.1-1 +- Update to 0.80.1 + +* Mon Mar 17 2025 Yaakov Selkowitz - 0.80.0-2 +- Avoid fast_float dependency + +* Mon Mar 17 2025 nmontero - 0.80.0-1 +- Update to 0.80.0 + +* Wed Mar 05 2025 nmontero - 0.79.91-1 +- Update to 0.79.91 + +* Wed Feb 19 2025 nmontero - 0.79.90-1 +- Update to 0.79.90 + +* Wed Feb 12 2025 nmontero - 0.79.90-1 +- Update to 0.79.0 + +* Sun Jan 19 2025 Fedora Release Engineering - 0.78.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sun Dec 08 2024 Pete Walter - 0.78.2-2 +- Rebuild for ICU 76 + +* Mon Nov 25 2024 nmontero - 0.78.2-1 +- Update to 0.78.2 + +* Tue Oct 22 2024 nmontero - 0.78.1-1 +- Update to 0.78.1 + +* Mon Sep 16 2024 David King - 0.78.0-1 +- Update to 0.78.0 + +* Sat Aug 10 2024 Jens Petersen - 0.77.91-2 +- fix vte.sh error: __vte_shell_precmd: command not found + +* Thu Aug 08 2024 David King - 0.77.91-1 +- Update to 0.77.91 + +* Wed Jul 24 2024 David King - 0.77.0-1 +- Update to 0.77.0 + +* Sat Jul 20 2024 Fedora Release Engineering - 0.76.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jun 10 2024 David King - 0.76.3-1 +- Update to 0.76.3 + +* Fri Jun 07 2024 David King - 0.76.2-2 +- Use updated notification patches from ptyxis + +* Tue May 28 2024 David King - 0.76.2-1 +- Update to 0.76.2 + +* Fri May 03 2024 David King - 0.76.1-1 +- Update to 0.76.1 + +* Tue Apr 02 2024 David King - 0.76.0-1 +- Update to 0.76.0 + +* Mon Feb 12 2024 Tomas Popela - 0.74.2-4 +- Build for the SPDX license format change + +* Wed Jan 31 2024 Pete Walter - 0.74.2-3 +- Rebuild for ICU 74 + +* Sat Jan 27 2024 Fedora Release Engineering - 0.74.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Dec 16 2023 Kalev Lember - 0.74.2-1 +- Update to 0.74.2 + +* Sun Oct 22 2023 Kalev Lember - 0.74.1-1 +- Update to 0.74.1 + +* Tue Sep 19 2023 Kalev Lember - 0.74.0-1 +- Update to 0.74.0 + +* Tue Aug 08 2023 Kalev Lember - 0.73.93-1 +- Update to 0.73.93 + +* Sat Jul 22 2023 Fedora Release Engineering - 0.72.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jul 11 2023 František Zatloukal - 0.72.2-2 +- Rebuilt for ICU 73.2 + +* Wed Jun 07 2023 Kalev Lember - 0.72.2-1 +- Update to 0.72.2 + +* Sun Apr 16 2023 David King - 0.72.1-1 +- Update to 0.72.1 + +* Mon Mar 20 2023 David King - 0.72.0-1 +- Update to 0.72.0 (#2179642) + +* Thu Mar 09 2023 David King - 0.71.99-1 +- Update to 0.71.99 + +* Wed Feb 15 2023 David King - 0.71.92-1 +- Update to 0.71.92 + +* Sat Jan 21 2023 Fedora Release Engineering - 0.70.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Dec 31 2022 Pete Walter - 0.70.2-2 +- Rebuild for ICU 72 + +* Tue Dec 06 2022 David King - 0.70.2-1 +- Update to 0.70.2 + +* Fri Oct 28 2022 David King - 0.70.1-1 +- Update to 0.70.1 + +* Mon Sep 26 2022 David King - 0.70.0-2 +- Fix GTK4 ABI padding (#2122922) + +* Mon Sep 19 2022 Kalev Lember - 0.70.0-1 +- Update to 0.70.0 + +* Mon Aug 08 2022 Kalev Lember - 0.69.92-1 +- Update to 0.69.92 + +* Wed Aug 03 2022 David King - 0.69.90-1 +- Update to 0.69.90 +- Enable GTK4 support + +* Mon Aug 01 2022 Frantisek Zatloukal - 0.68.0-3 +- Rebuilt for ICU 71.1 + +* Sat Jul 23 2022 Fedora Release Engineering - 0.68.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sun Mar 27 2022 David King - 0.68.0-1 +- Update to 0.68.0 + +* Thu Feb 17 2022 David King - 0.67.90-1 +- Update to 0.67.90 + +* Thu Jan 27 2022 David King - 0.66.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Dec 16 2021 David King - 0.66.2-1 +- Update to 0.66.2 + +* Mon Nov 01 2021 David King - 0.66.1-1 +- Update to 0.66.1 + +* Fri Oct 01 2021 Kalev Lember - 0.66.0-2 +- Require systemd-libs rather than systemd + +* Tue Sep 28 2021 David King - 0.66.0-1 +- Update to 0.66.0 + +* Fri Jul 23 2021 Fedora Release Engineering - 0.64.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jun 17 2021 Debarshi Ray - 0.64.2-2 +- Fix the License fields and ship the correct license texts + +* Wed Jun 16 2021 Debarshi Ray - 0.64.2-1 +- Update to 0.64.2 + +* Thu May 20 2021 Pete Walter - 0.64.1-3 +- Rebuild for ICU 69 + +* Fri May 07 2021 Debarshi Ray - 0.64.1-2 +- Add missing _VTE_CXX_NOEXCEPT in downstream patches + +* Thu May 06 2021 Debarshi Ray - 0.64.1-1 +- Update to 0.64.1 + +* Thu May 06 2021 Debarshi Ray - 0.64.0-1 +- Update to 0.64.0 + +* Thu May 06 2021 Debarshi Ray - 0.63.91-1 +- Update to 0.63.91 +- Rebase downstream patches + +* Thu Feb 18 2021 Kalev Lember - 0.62.3-2 +- Revert a change that limited select all, as decided by Workstation WG + +* Tue Feb 16 2021 Kalev Lember - 0.62.3-1 +- Update to 0.62.3 +- Use https URLs for upstream + +* Wed Jan 27 2021 Fedora Release Engineering - 0.62.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jan 25 2021 Kalev Lember - 0.62.2-1 +- Update to 0.62.2 + +* Wed Dec 16 2020 Debarshi Ray - 0.62.1-3 +- Accommodate 'sudo toolbox' when tracking the active container + +* Tue Nov 03 2020 Jeff Law - 0.62.1-2 +- Fix bogus volatile caught by gcc-11 + +* Thu Oct 08 2020 Debarshi Ray - 0.62.1-1 +- Update to 0.62.1 +- Rebase downstream patches + +* Thu Sep 24 2020 Debarshi Ray - 0.62.0-1 +- Update to 0.62.0 + +* Thu Sep 24 2020 Debarshi Ray - 0.61.91-1 +- Update to 0.61.91 + +* Thu Sep 24 2020 Debarshi Ray - 0.61.90-1 +- Update to 0.61.90 +- Rebase downstream patches + +* Wed Jul 29 2020 Fedora Release Engineering - 0.60.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jun 04 2020 Kalev Lember - 0.60.3-1 +- Update to 0.60.3 + +* Sat May 16 2020 Pete Walter - 0.60.2-2 +- Rebuild for ICU 67 + +* Mon Apr 27 2020 Kalev Lember - 0.60.2-1 +- Update to 0.60.2 + +* Mon Apr 06 2020 Debarshi Ray - 0.60.1-2 +- Improve legibility when using colours from the system theme + +* Tue Mar 31 2020 Kalev Lember - 0.60.1-1 +- Update to 0.60.1 + +* Sat Mar 21 2020 Kalev Lember - 0.60.0-2 +- Move vte-urlencode-cwd to vte-profile subpackage (#1815769) + +* Fri Mar 06 2020 Debarshi Ray - 0.60.0-1 +- Update to 0.60.0 + +* Mon Mar 02 2020 Debarshi Ray - 0.59.92-2 +- Replace C1 controls with C0 to emit OSC 777 from PS0 (RH #1783802) + +* Mon Mar 02 2020 Debarshi Ray - 0.59.92-1 +- Update to 0.59.92 + +* Thu Feb 20 2020 Debarshi Ray - 0.59.91-1 +- Update to 0.59.91 +- Rebase downstream patches + +* Wed Feb 19 2020 Debarshi Ray - 0.59.0-1 +- Update to 0.59.0 +- Rebase downstream patches + +* Fri Jan 31 2020 Fedora Release Engineering - 0.58.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Nov 27 2019 Kalev Lember - 0.58.3-1 +- Update to 0.58.3 +- Avoid overriding vte's own -fno-exceptions + +* Mon Oct 14 2019 Kalev Lember - 0.58.2-1 +- Update to 0.58.2 + +* Mon Oct 07 2019 Kalev Lember - 0.58.1-1 +- Update to 0.58.1 + +* Fri Oct 04 2019 Adam Williamson - 0.58.0-2 +- Backport fix for crash due to out of bounds cursor position (#1756567) + +* Mon Sep 09 2019 Kalev Lember - 0.58.0-1 +- Update to 0.58.0 + +* Mon Aug 12 2019 Kalev Lember - 0.57.90-1 +- Update to 0.57.90 + +* Sat Jul 27 2019 Fedora Release Engineering - 0.57.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jul 02 2019 Debarshi Ray - 0.57.3-1 +- Update to 0.57.3 +- Rebase downstream patches + +* Wed Jun 19 2019 Debarshi Ray - 0.57.0-2 +- Support tracking the active container inside the terminal + +* Tue Jun 18 2019 Debarshi Ray - 0.57.0-1 +- Update to 0.57.0 +- Switch to the Meson build system +- Rebase downstream patches + +* Tue May 07 2019 Kalev Lember - 0.56.3-1 +- Update to 0.56.3 + +* Mon May 06 2019 Kalev Lember - 0.56.2-1 +- Update to 0.56.2 + +* Tue Apr 09 2019 Kalev Lember - 0.56.1-1 +- Update to 0.56.1 + +* Tue Apr 02 2019 Debarshi Ray - 0.56.0-2 +- Add signals proxying an interactive shell's precmd and preexec hooks. + +* Mon Mar 11 2019 Kalev Lember - 0.56.0-1 +- Update to 0.56.0 + +* Mon Mar 04 2019 Kalev Lember - 0.55.92-1 +- Update to 0.55.92 + +* Tue Feb 19 2019 Kalev Lember - 0.55.90-2 +- Rebuilt against fixed atk (#1626575) + +* Tue Feb 19 2019 Kalev Lember - 0.55.90-1 +- Update to 0.55.90 + +* Sun Feb 03 2019 Fedora Release Engineering - 0.54.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Dec 12 2018 Kalev Lember - 0.54.3-1 +- Update to 0.54.3 + +* Fri Oct 26 2018 Kalev Lember - 0.54.2-1 +- Update to 0.54.2 + +* Mon Oct 08 2018 Debarshi Ray - 0.54.1-4 +- Removal of utmp logging makes the utmp group unnecessary + +* Fri Oct 05 2018 Debarshi Ray - 0.54.1-3 +- Tweak the escape sequence emission to unbreak the parsing + +* Fri Oct 05 2018 Debarshi Ray - 0.54.1-2 +- Tighten the dependencies a bit + +* Fri Oct 05 2018 Debarshi Ray - 0.54.1-1 +- Update to 0.54.1 + +* Thu Oct 04 2018 Debarshi Ray - 0.54.0-1 +- Update to 0.54.0 + +* Thu Oct 04 2018 Debarshi Ray - 0.53.92-1 +- Update to 0.53.92 + +* Sat Jul 14 2018 Fedora Release Engineering - 0.53.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jun 18 2018 Kalev Lember - 0.53.0-2 +- Require systemd, not initscripts for the utmp group (#1592403) + +* Mon Jun 04 2018 Debarshi Ray - 0.53.0-1 +- Update to 0.53.0 + +* Mon May 21 2018 Kalev Lember - 0.52.2-1 +- Update to 0.52.2 + +* Mon Apr 09 2018 Kalev Lember - 0.52.1-1 +- Update to 0.52.1 + +* Tue Apr 03 2018 Kalev Lember - 0.52.0-1 +- Update to 0.52.0 +- Remove ldconfig scriptlets + +* Wed Mar 28 2018 Debarshi Ray - 0.51.90-1 +- Update to 0.51.90 + +* Wed Mar 28 2018 Debarshi Ray - 0.51.3-1 +- Update to 0.51.3 +- Rebase downstream patches + +* Thu Feb 08 2018 Igor Gnatenko - 0.50.2-3 +- Switch to %%ldconfig_scriptlets + +* Thu Nov 02 2017 Kalev Lember - 0.50.2-2 +- Rebuild + +* Wed Nov 01 2017 Debarshi Ray - 0.50.2-1 +- Update to 0.50.2 + +* Thu Oct 05 2017 Debarshi Ray - 0.50.1-1 +- Update to 0.50.1 +- Rebase downstream patches + +* Thu Sep 14 2017 Kalev Lember - 0.50.0-1 +- Update to 0.50.0 +- Rebase downstream patches + +* Thu Aug 03 2017 Fedora Release Engineering - 0.48.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.48.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed May 10 2017 Kalev Lember - 0.48.3-1 +- Update to 0.48.3 + +* Wed Apr 12 2017 Kalev Lember - 0.48.2-1 +- Update to 0.48.2 +- Rebase downstream patches + +* Wed Mar 22 2017 Kalev Lember - 0.48.1-1 +- Update to 0.48.1 + +* Fri Feb 24 2017 Debarshi Ray - 0.47.90-1 +- Update to 0.47.90 +- Rebase downstream patches + +* Sat Feb 11 2017 Fedora Release Engineering - 0.46.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Nov 08 2016 Debarshi Ray - 0.46.1-1 +- Update to 0.46.1 +- Rebase downstream patches + +* Thu Sep 22 2016 Kalev Lember - 0.46.0-2 +- BR vala instead of obsolete vala-tools subpackage + +* Mon Sep 19 2016 Kalev Lember - 0.46.0-1 +- Update to 0.46.0 + +* Wed Sep 14 2016 Kalev Lember - 0.45.92-1 +- Update to 0.45.92 + +* Thu Aug 18 2016 Kalev Lember - 0.45.90-1 +- Update to 0.45.90 +- Rebase downstream patches + +* Fri Jul 01 2016 Debarshi Ray - 0.44.2-2 +- Add a property to configure the scroll speed + +* Tue May 10 2016 Debarshi Ray - 0.44.2-1 +- Update to 0.44.2 +- Rebase downstream patches and undo unintentional ABI break + +* Mon Apr 11 2016 Debarshi Ray - 0.44.1-1 +- Update to 0.44.1 + +* Tue Mar 22 2016 Kalev Lember - 0.44.0-1 +- Update to 0.44.0 + +* Tue Mar 15 2016 Debarshi Ray - 0.43.92-1 +- Update to 0.43.92 + +* Tue Mar 01 2016 Debarshi Ray - 0.43.91-1 +- Update to 0.43.91 +- Remove BuildRequires on pkgconfig(libpcre2-8) + +* Tue Mar 01 2016 Debarshi Ray - 0.43.90-1 +- Update to 0.43.90 + +* Fri Feb 05 2016 Fedora Release Engineering - 0.43.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 29 2016 Debarshi Ray - 0.43.2-1 +- Update to 0.43.2 + +* Fri Jan 29 2016 Debarshi Ray - 0.43.1-1 +- Update to 0.43.1 +- Drop upstreamed patch + +* Fri Jan 29 2016 Debarshi Ray - 0.43.0-1 +- Update to 0.43.0 +- Add BuildRequires on pkgconfig(libpcre2-8) +- Disable -Wnonnull + +* Thu Jan 28 2016 Debarshi Ray - 0.42.3-1 +- Update to 0.42.3 +- Backport upstream patch to fix disappearing lines (GNOME #761097) + +* Wed Oct 14 2015 Kalev Lember - 0.42.1-1 +- Update to 0.42.1 + +* Tue Sep 22 2015 Kalev Lember - 0.42.0-1 +- Update to 0.42.0 +- Use license macro for COPYING + +* Mon Sep 14 2015 Debarshi Ray - 0.41.90-1 +- Update to 0.41.90 +- Rebased downstream patches after the migration to C++ +- gnome-pty-helper has been removed + +* Fri Jun 19 2015 Fedora Release Engineering - 0.40.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue May 12 2015 Debarshi Ray - 0.40.2-1 +- Update to 0.40.2 + +* Tue Mar 24 2015 Debarshi Ray - 0.40.0-1 +- Update to 0.40.0 + +* Thu Mar 19 2015 Debarshi Ray - 0.39.92-1 +- Update to 0.39.92 + +* Tue Feb 17 2015 Debarshi Ray - 0.39.90-1 +- Update to 0.39.90 +- Add command-notify patches + +* Fri Dec 19 2014 Richard Hughes - 0.39.1-1 +- Update to 0.39.1 + +* Mon Dec 01 2014 Debarshi Ray - 0.39.0-2 +- Backport upstream patch to fix zombie shells (GNOME #740929) + +* Tue Nov 25 2014 Kalev Lember - 0.39.0-1 +- Update to 0.39.0 + +* Mon Nov 10 2014 Kalev Lember - 0.38.2-1 +- Update to 0.38.2 + +* Mon Oct 13 2014 Kalev Lember - 0.38.1-1 +- Update to 0.38.1 + +* Sun Sep 14 2014 Kalev Lember - 0.38.0-1 +- Update to 0.38.0 + +* Mon Aug 18 2014 Kalev Lember - 0.37.90-1 +- Update to 0.37.90 + +* Mon Aug 18 2014 Fedora Release Engineering - 0.37.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jul 22 2014 Kalev Lember - 0.37.2-2 +- Rebuilt for gobject-introspection 1.41.4 + +* Tue Jun 24 2014 Richard Hughes - 0.37.2-1 +- Update to 0.37.2 + +* Sun Jun 08 2014 Fedora Release Engineering - 0.37.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed May 28 2014 Kalev Lember - 0.37.1-1 +- Update to 0.37.1 + +* Wed May 07 2014 Kalev Lember - 0.37.0-2 +- Split out a vte-profile subpackage that can be used with both vte291 / vte3 + +* Tue May 06 2014 Kalev Lember - 0.37.0-1 +- Initial Fedora package, based on previous vte3 0.36 packaging diff --git a/vte291.spec b/vte291.spec index a89950b..63c8674 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ Name: vte291 Version: 0.80.2 -Release: 1%{?dist} +Release: %autorelease Summary: GTK terminal emulator library # libvte-2.91.so is generated from LGPLv2+ and MIT sources @@ -181,538 +181,4 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %{_sysconfdir}/profile.d/vte.sh %changelog -* Mon May 26 2025 nmontero - 0.80.2-1 -- Update to 0.80.2 - -* Mon Apr 14 2025 nmontero - 0.80.1-1 -- Update to 0.80.1 - -* Mon Mar 17 2025 Yaakov Selkowitz - 0.80.0-2 -- Avoid fast_float dependency - -* Mon Mar 17 2025 nmontero - 0.80.0-1 -- Update to 0.80.0 - -* Wed Mar 05 2025 nmontero - 0.79.91-1 -- Update to 0.79.91 - -* Wed Feb 19 2025 nmontero - 0.79.90-1 -- Update to 0.79.90 - -* Wed Feb 12 2025 nmontero - 0.79.90-1 -- Update to 0.79.0 - -* Sun Jan 19 2025 Fedora Release Engineering - 0.78.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Sun Dec 08 2024 Pete Walter - 0.78.2-2 -- Rebuild for ICU 76 - -* Mon Nov 25 2024 nmontero - 0.78.2-1 -- Update to 0.78.2 - -* Tue Oct 22 2024 nmontero - 0.78.1-1 -- Update to 0.78.1 - -* Mon Sep 16 2024 David King - 0.78.0-1 -- Update to 0.78.0 - -* Sat Aug 10 2024 Jens Petersen - 0.77.91-2 -- fix vte.sh error: __vte_shell_precmd: command not found - -* Thu Aug 08 2024 David King - 0.77.91-1 -- Update to 0.77.91 - -* Wed Jul 24 2024 David King - 0.77.0-1 -- Update to 0.77.0 - -* Sat Jul 20 2024 Fedora Release Engineering - 0.76.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Jun 10 2024 David King - 0.76.3-1 -- Update to 0.76.3 - -* Fri Jun 07 2024 David King - 0.76.2-2 -- Use updated notification patches from ptyxis - -* Tue May 28 2024 David King - 0.76.2-1 -- Update to 0.76.2 - -* Fri May 03 2024 David King - 0.76.1-1 -- Update to 0.76.1 - -* Tue Apr 02 2024 David King - 0.76.0-1 -- Update to 0.76.0 - -* Mon Feb 12 2024 Tomas Popela - 0.74.2-4 -- Build for the SPDX license format change - -* Wed Jan 31 2024 Pete Walter - 0.74.2-3 -- Rebuild for ICU 74 - -* Sat Jan 27 2024 Fedora Release Engineering - 0.74.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Dec 16 2023 Kalev Lember - 0.74.2-1 -- Update to 0.74.2 - -* Sun Oct 22 2023 Kalev Lember - 0.74.1-1 -- Update to 0.74.1 - -* Tue Sep 19 2023 Kalev Lember - 0.74.0-1 -- Update to 0.74.0 - -* Tue Aug 08 2023 Kalev Lember - 0.73.93-1 -- Update to 0.73.93 - -* Sat Jul 22 2023 Fedora Release Engineering - 0.72.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jul 11 2023 František Zatloukal - 0.72.2-2 -- Rebuilt for ICU 73.2 - -* Wed Jun 07 2023 Kalev Lember - 0.72.2-1 -- Update to 0.72.2 - -* Sun Apr 16 2023 David King - 0.72.1-1 -- Update to 0.72.1 - -* Mon Mar 20 2023 David King - 0.72.0-1 -- Update to 0.72.0 (#2179642) - -* Thu Mar 09 2023 David King - 0.71.99-1 -- Update to 0.71.99 - -* Wed Feb 15 2023 David King - 0.71.92-1 -- Update to 0.71.92 - -* Sat Jan 21 2023 Fedora Release Engineering - 0.70.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Dec 31 2022 Pete Walter - 0.70.2-2 -- Rebuild for ICU 72 - -* Tue Dec 06 2022 David King - 0.70.2-1 -- Update to 0.70.2 - -* Fri Oct 28 2022 David King - 0.70.1-1 -- Update to 0.70.1 - -* Mon Sep 26 2022 David King - 0.70.0-2 -- Fix GTK4 ABI padding (#2122922) - -* Mon Sep 19 2022 Kalev Lember - 0.70.0-1 -- Update to 0.70.0 - -* Mon Aug 08 2022 Kalev Lember - 0.69.92-1 -- Update to 0.69.92 - -* Wed Aug 03 2022 David King - 0.69.90-1 -- Update to 0.69.90 -- Enable GTK4 support - -* Mon Aug 01 2022 Frantisek Zatloukal - 0.68.0-3 -- Rebuilt for ICU 71.1 - -* Sat Jul 23 2022 Fedora Release Engineering - 0.68.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sun Mar 27 2022 David King - 0.68.0-1 -- Update to 0.68.0 - -* Thu Feb 17 2022 David King - 0.67.90-1 -- Update to 0.67.90 - -* Thu Jan 27 2022 David King - 0.66.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Thu Dec 16 2021 David King - 0.66.2-1 -- Update to 0.66.2 - -* Mon Nov 01 2021 David King - 0.66.1-1 -- Update to 0.66.1 - -* Fri Oct 01 2021 Kalev Lember - 0.66.0-2 -- Require systemd-libs rather than systemd - -* Tue Sep 28 2021 David King - 0.66.0-1 -- Update to 0.66.0 - -* Fri Jul 23 2021 Fedora Release Engineering - 0.64.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Thu Jun 17 2021 Debarshi Ray - 0.64.2-2 -- Fix the License fields and ship the correct license texts - -* Wed Jun 16 2021 Debarshi Ray - 0.64.2-1 -- Update to 0.64.2 - -* Thu May 20 2021 Pete Walter - 0.64.1-3 -- Rebuild for ICU 69 - -* Fri May 07 2021 Debarshi Ray - 0.64.1-2 -- Add missing _VTE_CXX_NOEXCEPT in downstream patches - -* Thu May 06 2021 Debarshi Ray - 0.64.1-1 -- Update to 0.64.1 - -* Thu May 06 2021 Debarshi Ray - 0.64.0-1 -- Update to 0.64.0 - -* Thu May 06 2021 Debarshi Ray - 0.63.91-1 -- Update to 0.63.91 -- Rebase downstream patches - -* Thu Feb 18 2021 Kalev Lember - 0.62.3-2 -- Revert a change that limited select all, as decided by Workstation WG - -* Tue Feb 16 2021 Kalev Lember - 0.62.3-1 -- Update to 0.62.3 -- Use https URLs for upstream - -* Wed Jan 27 2021 Fedora Release Engineering - 0.62.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Jan 25 2021 Kalev Lember - 0.62.2-1 -- Update to 0.62.2 - -* Wed Dec 16 2020 Debarshi Ray - 0.62.1-3 -- Accommodate 'sudo toolbox' when tracking the active container - -* Tue Nov 03 2020 Jeff Law - 0.62.1-2 -- Fix bogus volatile caught by gcc-11 - -* Thu Oct 08 2020 Debarshi Ray - 0.62.1-1 -- Update to 0.62.1 -- Rebase downstream patches - -* Thu Sep 24 2020 Debarshi Ray - 0.62.0-1 -- Update to 0.62.0 - -* Thu Sep 24 2020 Debarshi Ray - 0.61.91-1 -- Update to 0.61.91 - -* Thu Sep 24 2020 Debarshi Ray - 0.61.90-1 -- Update to 0.61.90 -- Rebase downstream patches - -* Wed Jul 29 2020 Fedora Release Engineering - 0.60.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jun 04 2020 Kalev Lember - 0.60.3-1 -- Update to 0.60.3 - -* Sat May 16 2020 Pete Walter - 0.60.2-2 -- Rebuild for ICU 67 - -* Mon Apr 27 2020 Kalev Lember - 0.60.2-1 -- Update to 0.60.2 - -* Mon Apr 06 2020 Debarshi Ray - 0.60.1-2 -- Improve legibility when using colours from the system theme - -* Tue Mar 31 2020 Kalev Lember - 0.60.1-1 -- Update to 0.60.1 - -* Sat Mar 21 2020 Kalev Lember - 0.60.0-2 -- Move vte-urlencode-cwd to vte-profile subpackage (#1815769) - -* Fri Mar 06 2020 Debarshi Ray - 0.60.0-1 -- Update to 0.60.0 - -* Mon Mar 02 2020 Debarshi Ray - 0.59.92-2 -- Replace C1 controls with C0 to emit OSC 777 from PS0 (RH #1783802) - -* Mon Mar 02 2020 Debarshi Ray - 0.59.92-1 -- Update to 0.59.92 - -* Thu Feb 20 2020 Debarshi Ray - 0.59.91-1 -- Update to 0.59.91 -- Rebase downstream patches - -* Wed Feb 19 2020 Debarshi Ray - 0.59.0-1 -- Update to 0.59.0 -- Rebase downstream patches - -* Fri Jan 31 2020 Fedora Release Engineering - 0.58.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Nov 27 2019 Kalev Lember - 0.58.3-1 -- Update to 0.58.3 -- Avoid overriding vte's own -fno-exceptions - -* Mon Oct 14 2019 Kalev Lember - 0.58.2-1 -- Update to 0.58.2 - -* Mon Oct 07 2019 Kalev Lember - 0.58.1-1 -- Update to 0.58.1 - -* Fri Oct 04 2019 Adam Williamson - 0.58.0-2 -- Backport fix for crash due to out of bounds cursor position (#1756567) - -* Mon Sep 09 2019 Kalev Lember - 0.58.0-1 -- Update to 0.58.0 - -* Mon Aug 12 2019 Kalev Lember - 0.57.90-1 -- Update to 0.57.90 - -* Sat Jul 27 2019 Fedora Release Engineering - 0.57.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Tue Jul 02 2019 Debarshi Ray - 0.57.3-1 -- Update to 0.57.3 -- Rebase downstream patches - -* Wed Jun 19 2019 Debarshi Ray - 0.57.0-2 -- Support tracking the active container inside the terminal - -* Tue Jun 18 2019 Debarshi Ray - 0.57.0-1 -- Update to 0.57.0 -- Switch to the Meson build system -- Rebase downstream patches - -* Tue May 07 2019 Kalev Lember - 0.56.3-1 -- Update to 0.56.3 - -* Mon May 06 2019 Kalev Lember - 0.56.2-1 -- Update to 0.56.2 - -* Tue Apr 09 2019 Kalev Lember - 0.56.1-1 -- Update to 0.56.1 - -* Tue Apr 02 2019 Debarshi Ray - 0.56.0-2 -- Add signals proxying an interactive shell's precmd and preexec hooks. - -* Mon Mar 11 2019 Kalev Lember - 0.56.0-1 -- Update to 0.56.0 - -* Mon Mar 04 2019 Kalev Lember - 0.55.92-1 -- Update to 0.55.92 - -* Tue Feb 19 2019 Kalev Lember - 0.55.90-2 -- Rebuilt against fixed atk (#1626575) - -* Tue Feb 19 2019 Kalev Lember - 0.55.90-1 -- Update to 0.55.90 - -* Sun Feb 03 2019 Fedora Release Engineering - 0.54.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Wed Dec 12 2018 Kalev Lember - 0.54.3-1 -- Update to 0.54.3 - -* Fri Oct 26 2018 Kalev Lember - 0.54.2-1 -- Update to 0.54.2 - -* Mon Oct 08 2018 Debarshi Ray - 0.54.1-4 -- Removal of utmp logging makes the utmp group unnecessary - -* Fri Oct 05 2018 Debarshi Ray - 0.54.1-3 -- Tweak the escape sequence emission to unbreak the parsing - -* Fri Oct 05 2018 Debarshi Ray - 0.54.1-2 -- Tighten the dependencies a bit - -* Fri Oct 05 2018 Debarshi Ray - 0.54.1-1 -- Update to 0.54.1 - -* Thu Oct 04 2018 Debarshi Ray - 0.54.0-1 -- Update to 0.54.0 - -* Thu Oct 04 2018 Debarshi Ray - 0.53.92-1 -- Update to 0.53.92 - -* Sat Jul 14 2018 Fedora Release Engineering - 0.53.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Jun 18 2018 Kalev Lember - 0.53.0-2 -- Require systemd, not initscripts for the utmp group (#1592403) - -* Mon Jun 04 2018 Debarshi Ray - 0.53.0-1 -- Update to 0.53.0 - -* Mon May 21 2018 Kalev Lember - 0.52.2-1 -- Update to 0.52.2 - -* Mon Apr 09 2018 Kalev Lember - 0.52.1-1 -- Update to 0.52.1 - -* Tue Apr 03 2018 Kalev Lember - 0.52.0-1 -- Update to 0.52.0 -- Remove ldconfig scriptlets - -* Wed Mar 28 2018 Debarshi Ray - 0.51.90-1 -- Update to 0.51.90 - -* Wed Mar 28 2018 Debarshi Ray - 0.51.3-1 -- Update to 0.51.3 -- Rebase downstream patches - -* Thu Feb 08 2018 Igor Gnatenko - 0.50.2-3 -- Switch to %%ldconfig_scriptlets - -* Thu Nov 02 2017 Kalev Lember - 0.50.2-2 -- Rebuild - -* Wed Nov 01 2017 Debarshi Ray - 0.50.2-1 -- Update to 0.50.2 - -* Thu Oct 05 2017 Debarshi Ray - 0.50.1-1 -- Update to 0.50.1 -- Rebase downstream patches - -* Thu Sep 14 2017 Kalev Lember - 0.50.0-1 -- Update to 0.50.0 -- Rebase downstream patches - -* Thu Aug 03 2017 Fedora Release Engineering - 0.48.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 0.48.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Wed May 10 2017 Kalev Lember - 0.48.3-1 -- Update to 0.48.3 - -* Wed Apr 12 2017 Kalev Lember - 0.48.2-1 -- Update to 0.48.2 -- Rebase downstream patches - -* Wed Mar 22 2017 Kalev Lember - 0.48.1-1 -- Update to 0.48.1 - -* Fri Feb 24 2017 Debarshi Ray - 0.47.90-1 -- Update to 0.47.90 -- Rebase downstream patches - -* Sat Feb 11 2017 Fedora Release Engineering - 0.46.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Nov 08 2016 Debarshi Ray - 0.46.1-1 -- Update to 0.46.1 -- Rebase downstream patches - -* Thu Sep 22 2016 Kalev Lember - 0.46.0-2 -- BR vala instead of obsolete vala-tools subpackage - -* Mon Sep 19 2016 Kalev Lember - 0.46.0-1 -- Update to 0.46.0 - -* Wed Sep 14 2016 Kalev Lember - 0.45.92-1 -- Update to 0.45.92 - -* Thu Aug 18 2016 Kalev Lember - 0.45.90-1 -- Update to 0.45.90 -- Rebase downstream patches - -* Fri Jul 01 2016 Debarshi Ray - 0.44.2-2 -- Add a property to configure the scroll speed - -* Tue May 10 2016 Debarshi Ray - 0.44.2-1 -- Update to 0.44.2 -- Rebase downstream patches and undo unintentional ABI break - -* Mon Apr 11 2016 Debarshi Ray - 0.44.1-1 -- Update to 0.44.1 - -* Tue Mar 22 2016 Kalev Lember - 0.44.0-1 -- Update to 0.44.0 - -* Tue Mar 15 2016 Debarshi Ray - 0.43.92-1 -- Update to 0.43.92 - -* Tue Mar 01 2016 Debarshi Ray - 0.43.91-1 -- Update to 0.43.91 -- Remove BuildRequires on pkgconfig(libpcre2-8) - -* Tue Mar 01 2016 Debarshi Ray - 0.43.90-1 -- Update to 0.43.90 - -* Fri Feb 05 2016 Fedora Release Engineering - 0.43.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Fri Jan 29 2016 Debarshi Ray - 0.43.2-1 -- Update to 0.43.2 - -* Fri Jan 29 2016 Debarshi Ray - 0.43.1-1 -- Update to 0.43.1 -- Drop upstreamed patch - -* Fri Jan 29 2016 Debarshi Ray - 0.43.0-1 -- Update to 0.43.0 -- Add BuildRequires on pkgconfig(libpcre2-8) -- Disable -Wnonnull - -* Thu Jan 28 2016 Debarshi Ray - 0.42.3-1 -- Update to 0.42.3 -- Backport upstream patch to fix disappearing lines (GNOME #761097) - -* Wed Oct 14 2015 Kalev Lember - 0.42.1-1 -- Update to 0.42.1 - -* Tue Sep 22 2015 Kalev Lember - 0.42.0-1 -- Update to 0.42.0 -- Use license macro for COPYING - -* Mon Sep 14 2015 Debarshi Ray - 0.41.90-1 -- Update to 0.41.90 -- Rebased downstream patches after the migration to C++ -- gnome-pty-helper has been removed - -* Fri Jun 19 2015 Fedora Release Engineering - 0.40.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Tue May 12 2015 Debarshi Ray - 0.40.2-1 -- Update to 0.40.2 - -* Tue Mar 24 2015 Debarshi Ray - 0.40.0-1 -- Update to 0.40.0 - -* Thu Mar 19 2015 Debarshi Ray - 0.39.92-1 -- Update to 0.39.92 - -* Tue Feb 17 2015 Debarshi Ray - 0.39.90-1 -- Update to 0.39.90 -- Add command-notify patches - -* Fri Dec 19 2014 Richard Hughes - 0.39.1-1 -- Update to 0.39.1 - -* Mon Dec 01 2014 Debarshi Ray - 0.39.0-2 -- Backport upstream patch to fix zombie shells (GNOME #740929) - -* Tue Nov 25 2014 Kalev Lember - 0.39.0-1 -- Update to 0.39.0 - -* Mon Nov 10 2014 Kalev Lember - 0.38.2-1 -- Update to 0.38.2 - -* Mon Oct 13 2014 Kalev Lember - 0.38.1-1 -- Update to 0.38.1 - -* Sun Sep 14 2014 Kalev Lember - 0.38.0-1 -- Update to 0.38.0 - -* Mon Aug 18 2014 Kalev Lember - 0.37.90-1 -- Update to 0.37.90 - -* Mon Aug 18 2014 Fedora Release Engineering - 0.37.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Tue Jul 22 2014 Kalev Lember - 0.37.2-2 -- Rebuilt for gobject-introspection 1.41.4 - -* Tue Jun 24 2014 Richard Hughes - 0.37.2-1 -- Update to 0.37.2 - -* Sun Jun 08 2014 Fedora Release Engineering - 0.37.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Wed May 28 2014 Kalev Lember - 0.37.1-1 -- Update to 0.37.1 - -* Wed May 07 2014 Kalev Lember - 0.37.0-2 -- Split out a vte-profile subpackage that can be used with both vte291 / vte3 - -* Tue May 06 2014 Kalev Lember - 0.37.0-1 -- Initial Fedora package, based on previous vte3 0.36 packaging +%autochangelog From ef65a928ac5777a2e3ba2eb5834949c49f61f3b5 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Fri, 6 Jun 2025 17:08:56 -0500 Subject: [PATCH 076/102] Delete demo desktop files These are user-visible, so they need to either go into a subpackage or go away, one or the other. I'm not in the mood to add a subpackage today. If you want these back, feel free to create a subpackage. --- vte291.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vte291.spec b/vte291.spec index 63c8674..6896d57 100644 --- a/vte291.spec +++ b/vte291.spec @@ -129,6 +129,8 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %install %meson_install +rm %{buildroot}/%{_datadir}/applications/org.gnome.Vte.App.Gtk3.desktop +rm %{buildroot}/%{_datadir}/applications/org.gnome.Vte.App.Gtk4.desktop %find_lang vte-%{apiver} @@ -140,8 +142,6 @@ sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %dir %{_libdir}/girepository-1.0 %{_libdir}/girepository-1.0/Vte-2.91.typelib %{_userunitdir}/vte-spawn-.scope.d -%{_datadir}/applications/org.gnome.Vte.App.Gtk3.desktop -%{_datadir}/applications/org.gnome.Vte.App.Gtk4.desktop %{_datadir}/xdg-terminals/org.gnome.Vte.App.Gtk3.desktop %{_datadir}/xdg-terminals/org.gnome.Vte.App.Gtk4.desktop From dbb3baa37a7ee90e4dccbdb8951b816a9b4b075b Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 9 Jul 2025 13:27:28 +0200 Subject: [PATCH 077/102] Update to 0.81.0 --- .gitignore | 117 +----------------- ...oat-when-std-from_chars-is-insuffici.patch | 30 ++--- sources | 2 +- vte291.spec | 11 +- 4 files changed, 27 insertions(+), 133 deletions(-) diff --git a/.gitignore b/.gitignore index 2a8358a..f80d291 100644 --- a/.gitignore +++ b/.gitignore @@ -1,115 +1,2 @@ -/vte-0.37.0.tar.xz -/vte-0.37.1.tar.xz -/vte-0.37.2.tar.xz -/vte-0.37.90.tar.xz -/vte-0.38.0.tar.xz -/vte-0.38.1.tar.xz -/vte-0.38.2.tar.xz -/vte-0.39.0.tar.xz -/vte-0.39.1.tar.xz -/vte-0.39.90.tar.xz -/vte-0.39.92.tar.xz -/vte-0.40.0.tar.xz -/vte-0.40.2.tar.xz -/vte-0.41.90.tar.xz -/vte-0.42.0.tar.xz -/vte-0.42.1.tar.xz -/vte-0.42.3.tar.xz -/vte-0.43.0.tar.xz -/vte-0.43.1.tar.xz -/vte-0.43.2.tar.xz -/vte-0.43.90.tar.xz -/vte-0.43.91.tar.xz -/vte-0.43.92.tar.xz -/vte-0.44.0.tar.xz -/vte-0.44.1.tar.xz -/vte-0.44.2.tar.xz -/vte-0.45.90.tar.xz -/vte-0.45.92.tar.xz -/vte-0.46.0.tar.xz -/vte-0.46.1.tar.xz -/vte-0.47.90.tar.xz -/vte-0.48.1.tar.xz -/vte-0.48.2.tar.xz -/vte-0.48.3.tar.xz -/vte-0.50.0.tar.xz -/vte-0.50.1.tar.xz -/vte-0.50.2.tar.xz -/vte-0.51.3.tar.xz -/vte-0.51.90.tar.xz -/vte-0.52.0.tar.xz -/vte-0.52.1.tar.xz -/vte-0.52.2.tar.xz -/vte-0.53.0.tar.xz -/vte-0.53.92.tar.xz -/vte-0.54.0.tar.xz -/vte-0.54.1.tar.xz -/vte-0.54.2.tar.xz -/vte-0.54.3.tar.xz -/vte-0.55.90.tar.xz -/vte-0.55.92.tar.xz -/vte-0.56.0.tar.xz -/vte-0.56.1.tar.xz -/vte-0.56.2.tar.xz -/vte-0.56.3.tar.xz -/vte-0.57.0.tar.xz -/vte-0.57.3.tar.xz -/vte-0.57.90.tar.xz -/vte-0.58.0.tar.xz -/vte-0.58.1.tar.xz -/vte-0.58.2.tar.xz -/vte-0.58.3.tar.xz -/vte-0.59.0.tar.xz -/vte-0.59.91.tar.xz -/vte-0.59.92.tar.xz -/vte-0.60.0.tar.xz -/vte-0.60.1.tar.xz -/vte-0.60.2.tar.xz -/vte-0.60.3.tar.xz -/vte-0.61.90.tar.xz -/vte-0.61.91.tar.xz -/vte-0.62.0.tar.xz -/vte-0.62.1.tar.xz -/vte-0.62.2.tar.xz -/vte-0.62.3.tar.xz -/vte-0.63.91.tar.xz -/vte-0.64.0.tar.xz -/vte-0.64.1.tar.xz -/vte-0.64.2.tar.xz -/vte-0.65.91.tar.bz2 -/vte-0.66.0.tar.bz2 -/vte-0.66.1.tar.bz2 -/vte-0.66.2.tar.xz -/vte-0.67.90.tar.xz -/vte-0.68.0.tar.bz2 -/vte-0.69.90.tar.xz -/vte-0.69.92.tar.bz2 -/vte-0.70.0.tar.xz -/vte-0.70.1.tar.xz -/vte-0.70.2.tar.xz -/vte-0.71.92.tar.xz -/vte-0.71.99.tar.xz -/vte-0.72.0.tar.bz2 -/vte-0.72.0.tar.xz -/vte-0.72.1.tar.bz2 -/vte-0.72.2.tar.xz -/vte-0.73.93.tar.xz -/vte-0.74.0.tar.xz -/vte-0.74.1.tar.xz -/vte-0.74.2.tar.xz -/vte-0.76.0.tar.xz -/vte-0.76.1.tar.xz -/vte-0.76.2.tar.xz -/vte-0.76.3.tar.xz -/vte-0.77.0.tar.bz2 -/vte-0.77.91.tar.xz -/vte-0.77.92.tar.bz2 -/vte-0.78.0.tar.xz -/vte-0.78.1.tar.xz -/vte-0.78.2.tar.xz -/vte-0.79.90.tar.xz -/vte-0.79.0.tar.xz -/vte-0.79.91.tar.xz -/vte-0.80.0.tar.xz -/vte-0.80.1.tar.xz -/vte-0.80.2.tar.xz +/vte-*.tar.xz +/vte-*-build diff --git a/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch b/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch index b44c953..54dd033 100644 --- a/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch +++ b/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch @@ -1,4 +1,4 @@ -From 39557ba02e67af3d6585da96560459bc3b922ca3 Mon Sep 17 00:00:00 2001 +From 5a7238855b363502686557d7cb08ab23823caff6 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 19 Feb 2025 13:43:15 -0500 Subject: [PATCH] Only use fast_float when std::from_chars is insufficient @@ -10,14 +10,14 @@ older g++. --- meson.build | 25 +++++++++++++++++++++++++ src/color-parser.cc | 4 ++++ - src/termprops.hh | 4 ++++ + src/properties.hh | 4 ++++ 3 files changed, 33 insertions(+) diff --git a/meson.build b/meson.build -index 7b590c33..ab02880a 100644 +index b7dc930d6..dabe21488 100644 --- a/meson.build +++ b/meson.build -@@ -675,6 +675,29 @@ config_h.set10('WITH_SYSTEMD', systemd_dep.found()) +@@ -698,6 +698,29 @@ config_h.set10('WITH_SYSTEMD', systemd_dep.found()) # try compiling a test programme to see if the version is new enough. if cxx.compiles(''' @@ -47,7 +47,7 @@ index 7b590c33..ab02880a 100644 #include #include #include -@@ -701,6 +724,8 @@ else +@@ -724,6 +747,8 @@ else fast_float_dep = dependency('fast_float', required: true) endif @@ -57,7 +57,7 @@ index 7b590c33..ab02880a 100644 config_sources = [ diff --git a/src/color-parser.cc b/src/color-parser.cc -index 237b4ca7..8d205307 100644 +index 237b4ca79..8d205307f 100644 --- a/src/color-parser.cc +++ b/src/color-parser.cc @@ -29,7 +29,11 @@ @@ -70,14 +70,14 @@ index 237b4ca7..8d205307 100644 +#define fast_float std +#endif - #include "color-names.hh" + #include -diff --git a/src/termprops.hh b/src/termprops.hh -index c9253764..0f462acb 100644 ---- a/src/termprops.hh -+++ b/src/termprops.hh -@@ -35,7 +35,11 @@ - #include +diff --git a/src/properties.hh b/src/properties.hh +index 7c7c597f2..fcd4a190c 100644 +--- a/src/properties.hh ++++ b/src/properties.hh +@@ -40,7 +40,11 @@ + #include #include +#if WITH_FAST_FLOAT @@ -86,8 +86,8 @@ index c9253764..0f462acb 100644 +#define fast_float std +#endif - namespace vte::terminal { + namespace vte::property { -- -2.48.1 +GitLab diff --git a/sources b/sources index a8d6ce3..581bd3b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.80.2.tar.xz) = 6ff5dc8971279b3cb035f0b70a2c13b06f97cea840e117c4fa0273ec491a00ed4475abc4b84e91b5536d85714b6f751092a2652027df477d746fe66f407a2de2 +SHA512 (vte-0.81.0.tar.xz) = e6d9ae09fa37e118de4e0557552f8fea757c6f73149ebf396ceffc077c737f4d0d5ce2ff3ddc099ac616ed24c8ac0162d21eaa7cf3c59c9911011fbf05950505 diff --git a/vte291.spec b/vte291.spec index 6896d57..8109932 100644 --- a/vte291.spec +++ b/vte291.spec @@ -1,5 +1,6 @@ %global apiver 2.91 +%global fmt_version 11.0.0 %global fribidi_version 1.0.0 %global glib2_version 2.72.0 %global gnutls_version 3.2.7 @@ -11,7 +12,7 @@ %global pcre2_version 10.21 Name: vte291 -Version: 0.80.2 +Version: 0.81.0 Release: %autorelease Summary: GTK terminal emulator library @@ -19,11 +20,12 @@ Summary: GTK terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.80/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.81/vte-%{version}.tar.xz # https://gitlab.gnome.org/GNOME/vte/-/merge_requests/2 Patch0: 0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch +BuildRequires: pkgconfig(fmt) >= %{fmt_version} BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} BuildRequires: pkgconfig(gio-2.0) >= %{glib2_version} BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} @@ -36,6 +38,7 @@ BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(libpcre2-8) >= %{pcre2_version} BuildRequires: pkgconfig(libsystemd) >= %{libsystemd_version} BuildRequires: pkgconfig(pango) >= %{pango_version} +BuildRequires: fast_float-devel BuildRequires: gcc-c++ BuildRequires: gettext BuildRequires: gi-docgen @@ -144,6 +147,10 @@ rm %{buildroot}/%{_datadir}/applications/org.gnome.Vte.App.Gtk4.desktop %{_userunitdir}/vte-spawn-.scope.d %{_datadir}/xdg-terminals/org.gnome.Vte.App.Gtk3.desktop %{_datadir}/xdg-terminals/org.gnome.Vte.App.Gtk4.desktop +%dir %{_datadir}/vte-2.91 +%dir %{_datadir}/vte-2.91/terminfo +%dir %{_datadir}/vte-2.91/terminfo/x +%{_datadir}/vte-2.91/terminfo/x/xterm-256color %files gtk4 %{_libdir}/libvte-%{apiver}-gtk4.so.0* From 16c104b4e302a9f226cbba3998b388fa0adfcf04 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 9 Jul 2025 14:34:34 +0200 Subject: [PATCH 078/102] Add simdutf dependency --- vte291.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vte291.spec b/vte291.spec index 8109932..becb163 100644 --- a/vte291.spec +++ b/vte291.spec @@ -10,6 +10,7 @@ %global libsystemd_version 220 %global pango_version 1.22.0 %global pcre2_version 10.21 +%global simdutf_version 7.2.1 Name: vte291 Version: 0.81.0 @@ -38,6 +39,7 @@ BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(libpcre2-8) >= %{pcre2_version} BuildRequires: pkgconfig(libsystemd) >= %{libsystemd_version} BuildRequires: pkgconfig(pango) >= %{pango_version} +BuildRequires: pkgconfig(simdutf) >= %{simdutf_version} BuildRequires: fast_float-devel BuildRequires: gcc-c++ BuildRequires: gettext From 1f4ccca048c0fb67e030f0092cf4f94f2a9f31fb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:14:46 +0000 Subject: [PATCH 079/102] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 67a7646a01b09b5197402e202e67fe0996a84f2c Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 28 Jul 2025 17:05:30 -0400 Subject: [PATCH 080/102] Update std::from_chars patch https://gitlab.gnome.org/GNOME/vte/-/merge_requests/2 --- ...oat-when-std-from_chars-is-insuffici.patch | 51 ++++++++++++++++--- vte291.spec | 1 - 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch b/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch index 54dd033..672fa27 100644 --- a/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch +++ b/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch @@ -1,4 +1,4 @@ -From 5a7238855b363502686557d7cb08ab23823caff6 Mon Sep 17 00:00:00 2001 +From 31a469d55774e8487003e26964c5e7e071ad8e84 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 19 Feb 2025 13:43:15 -0500 Subject: [PATCH] Only use fast_float when std::from_chars is insufficient @@ -10,14 +10,16 @@ older g++. --- meson.build | 25 +++++++++++++++++++++++++ src/color-parser.cc | 4 ++++ + src/parser-glue.hh | 5 +++++ + src/parser-test.cc | 2 ++ src/properties.hh | 4 ++++ - 3 files changed, 33 insertions(+) + 5 files changed, 40 insertions(+) diff --git a/meson.build b/meson.build -index b7dc930d6..dabe21488 100644 +index 5a53eeda..fb80a52e 100644 --- a/meson.build +++ b/meson.build -@@ -698,6 +698,29 @@ config_h.set10('WITH_SYSTEMD', systemd_dep.found()) +@@ -730,6 +730,29 @@ config_h.set10('WITH_SYSTEMD', systemd_dep.found()) # try compiling a test programme to see if the version is new enough. if cxx.compiles(''' @@ -47,7 +49,7 @@ index b7dc930d6..dabe21488 100644 #include #include #include -@@ -724,6 +747,8 @@ else +@@ -756,6 +779,8 @@ else fast_float_dep = dependency('fast_float', required: true) endif @@ -57,7 +59,7 @@ index b7dc930d6..dabe21488 100644 config_sources = [ diff --git a/src/color-parser.cc b/src/color-parser.cc -index 237b4ca79..8d205307f 100644 +index e6a813be..1d6175d6 100644 --- a/src/color-parser.cc +++ b/src/color-parser.cc @@ -29,7 +29,11 @@ @@ -72,8 +74,41 @@ index 237b4ca79..8d205307f 100644 #include +diff --git a/src/parser-glue.hh b/src/parser-glue.hh +index e129c1a2..e43f864e 100644 +--- a/src/parser-glue.hh ++++ b/src/parser-glue.hh +@@ -26,7 +26,12 @@ + + #include "debug.hh" + ++#if WITH_FAST_FLOAT + #include ++#else ++#include ++#define fast_float std ++#endif + + #include + +diff --git a/src/parser-test.cc b/src/parser-test.cc +index e076bb49..42430cd6 100644 +--- a/src/parser-test.cc ++++ b/src/parser-test.cc +@@ -1738,9 +1738,11 @@ main(int argc, + g_test_add_func("/vte/parser/sequences/glue/uchar", test_seq_glue_uchar); + g_test_add_func("/vte/parser/sequences/glue/string", test_seq_glue_string); + g_test_add_func("/vte/parser/sequences/glue/string-tokeniser/char", test_seq_glue_string_tokeniser); ++#if HAVE_FAST_FLOAT + // requires newest fast_float + // g_test_add_func("/vte/parser/sequences/glue/string-tokeniser/char8_t", test_seq_glue_string_tokeniser); + g_test_add_func("/vte/parser/sequences/glue/string-tokeniser/char32_t", test_seq_glue_string_tokeniser); ++#endif + g_test_add_func("/vte/parser/sequences/glue/sequence-builder", test_seq_glue_sequence_builder); + g_test_add_func("/vte/parser/sequences/control", test_seq_control); + g_test_add_func("/vte/parser/sequences/escape/invalid", test_seq_esc_invalid); diff --git a/src/properties.hh b/src/properties.hh -index 7c7c597f2..fcd4a190c 100644 +index 58e1d2c9..9757bf54 100644 --- a/src/properties.hh +++ b/src/properties.hh @@ -40,7 +40,11 @@ @@ -89,5 +124,5 @@ index 7c7c597f2..fcd4a190c 100644 namespace vte::property { -- -GitLab +2.50.1 diff --git a/vte291.spec b/vte291.spec index becb163..81dbc12 100644 --- a/vte291.spec +++ b/vte291.spec @@ -40,7 +40,6 @@ BuildRequires: pkgconfig(libpcre2-8) >= %{pcre2_version} BuildRequires: pkgconfig(libsystemd) >= %{libsystemd_version} BuildRequires: pkgconfig(pango) >= %{pango_version} BuildRequires: pkgconfig(simdutf) >= %{simdutf_version} -BuildRequires: fast_float-devel BuildRequires: gcc-c++ BuildRequires: gettext BuildRequires: gi-docgen From d77bcdd7cc1719951afcfe0bccd503f4769ca082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Tue, 5 Aug 2025 23:55:09 +0200 Subject: [PATCH 081/102] Rebuilt for icu 77.1 From dedee5c4eeaaa6666b40ed9da82fce42114590ac Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 25 Aug 2025 19:03:40 +0200 Subject: [PATCH 082/102] Update to version 0.81.90 --- sources | 2 +- vte291.spec | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sources b/sources index 581bd3b..3e03cef 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.81.0.tar.xz) = e6d9ae09fa37e118de4e0557552f8fea757c6f73149ebf396ceffc077c737f4d0d5ce2ff3ddc099ac616ed24c8ac0162d21eaa7cf3c59c9911011fbf05950505 +SHA512 (vte-0.81.90.tar.xz) = 733ebde781fde8838a2f1151c733c5d669b07bc8033379bd61931786c16f7f79296ead197b3ecafe2d9a95bce086b4f8f54e090a90cc4cfa8ce07ac3538d2388 diff --git a/vte291.spec b/vte291.spec index 81dbc12..d413f56 100644 --- a/vte291.spec +++ b/vte291.spec @@ -13,7 +13,7 @@ %global simdutf_version 7.2.1 Name: vte291 -Version: 0.81.0 +Version: 0.81.90 Release: %autorelease Summary: GTK terminal emulator library @@ -148,10 +148,6 @@ rm %{buildroot}/%{_datadir}/applications/org.gnome.Vte.App.Gtk4.desktop %{_userunitdir}/vte-spawn-.scope.d %{_datadir}/xdg-terminals/org.gnome.Vte.App.Gtk3.desktop %{_datadir}/xdg-terminals/org.gnome.Vte.App.Gtk4.desktop -%dir %{_datadir}/vte-2.91 -%dir %{_datadir}/vte-2.91/terminfo -%dir %{_datadir}/vte-2.91/terminfo/x -%{_datadir}/vte-2.91/terminfo/x/xterm-256color %files gtk4 %{_libdir}/libvte-%{apiver}-gtk4.so.0* From 3c7962ad56a3fac12f22385a5a16c3ce1eb798a1 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 16 Dec 2022 11:00:34 -0500 Subject: [PATCH 083/102] Ensure correct fonts are installed for HTML docs --- vte291.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vte291.spec b/vte291.spec index d413f56..3e7eda1 100644 --- a/vte291.spec +++ b/vte291.spec @@ -87,6 +87,10 @@ Summary: Development files for GTK+ 3 %{name} License: GPL-3.0-or-later AND LGPL-3.0-or-later Requires: %{name}%{?_isa} = %{version}-%{release} +# Because web fonts from upstream are not bundled in the gi-docgen package, +# packages containing documentation generated with gi-docgen should depend on +# this metapackage to ensure the proper system fonts are present. +Recommends: gi-docgen-fonts %description devel The %{name}-devel package contains libraries and header files for @@ -101,6 +105,10 @@ License: GPL-3.0-or-later AND LGPL-3.0-or-later Requires: %{name}-gtk4%{?_isa} = %{version}-%{release} Requires: %{name}-devel%{?_isa} = %{version}-%{release} +# Because web fonts from upstream are not bundled in the gi-docgen package, +# packages containing documentation generated with gi-docgen should depend on +# this metapackage to ensure the proper system fonts are present. +Recommends: gi-docgen-fonts %description gtk4-devel The %{name}-gtk4-devel package contains libraries and header files for From 55becaf64d0487f001f7e5cf10a5dc32f6d02ab0 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Wed, 3 Sep 2025 16:54:26 -0500 Subject: [PATCH 084/102] Add a bunch of patches! The a11y patches are requested by Lenovo. Then we also have a fix for: https://bugzilla.redhat.com/show_bug.cgi?id=2390745 --- a11y-granular-scroll-notifications.patch | 197 +++++++++++++++++++++++ a11y-line-counting.patch | 30 ++++ a11y-range-per-text-attribute.patch | 37 +++++ fix-backspace.patch | 27 ++++ vte291.spec | 12 +- 5 files changed, 302 insertions(+), 1 deletion(-) create mode 100644 a11y-granular-scroll-notifications.patch create mode 100644 a11y-line-counting.patch create mode 100644 a11y-range-per-text-attribute.patch create mode 100644 fix-backspace.patch diff --git a/a11y-granular-scroll-notifications.patch b/a11y-granular-scroll-notifications.patch new file mode 100644 index 0000000..1ef57d6 --- /dev/null +++ b/a11y-granular-scroll-notifications.patch @@ -0,0 +1,197 @@ +From f685d94c79e03d352bdb9a567268db233066aed5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tyrychtr?= +Date: Wed, 20 Aug 2025 14:34:20 +0200 +Subject: [PATCH] vteaccess-gtk4: Implement granular notifications upon + scrolling + +This MR implements the missing scroll notifications, which are much more +semantic than the previous ones which only relied on the changed text. + +Fixes #2877 +--- + src/vteaccess-gtk4.cc | 88 +++++++++++++++++++++++++++++++++++++++++-- + src/vteaccess-gtk4.h | 1 + + src/vteinternal.hh | 23 ++++++----- + 3 files changed, 100 insertions(+), 12 deletions(-) + +diff --git a/src/vteaccess-gtk4.cc b/src/vteaccess-gtk4.cc +index b886d2c6c..e626bb274 100644 +--- a/src/vteaccess-gtk4.cc ++++ b/src/vteaccess-gtk4.cc +@@ -75,6 +75,7 @@ typedef struct _VteAccessibleText + VteTerminal *terminal; + VteAccessibleTextContents contents[2]; + guint contents_flip : 1; ++ guint text_scrolled : 1; + } VteAccessibleText; + + static inline gboolean +@@ -816,6 +817,11 @@ vte_accessible_text_contents_changed (VteTerminal *terminal, + if (!vte_terminal_get_enable_a11y (terminal)) + return; + ++ if (state->text_scrolled) { ++ state->text_scrolled = FALSE; ++ return; ++ } ++ + prev = &state->contents[state->contents_flip]; + next = &state->contents[!state->contents_flip]; + +@@ -839,12 +845,11 @@ vte_accessible_text_contents_changed (VteTerminal *terminal, + /* NOTE: + * + * The code below is based upon what vteaccess.cc did for GTK 3. +- * It does not do any sort of appropriate diffing to try to handle +- * scrolling correctly. That would be a good idea to implement in +- * the longer term. + * + * It just looks for a long prefix match, and then a long suffix + * match and attempts to diff what is between those to end points. ++ * ++ * Scrolling based changes are handled separately. + */ + + const char *prevc = prevstr; +@@ -1017,3 +1022,80 @@ _vte_accessible_text_init (GtkAccessibleText *accessible) + GTK_ACCESSIBLE_PROPERTY_MULTI_LINE, TRUE, + GTK_ACCESSIBLE_VALUE_UNDEFINED); + } ++ ++void ++_vte_accessible_text_scrolled (GtkAccessibleText *accessible, long delta) ++{ ++ VteTerminal *terminal = VTE_TERMINAL (accessible); ++ VteAccessibleText *state = vte_accessible_text_get (terminal); ++ VteAccessibleTextContents *prev = &state->contents[state->contents_flip]; ++ VteAccessibleTextContents *next = &state->contents[!state->contents_flip]; ++ ++ g_assert (VTE_IS_TERMINAL (terminal)); ++ g_assert (state != nullptr); ++ g_assert (state->terminal == terminal); ++ ++ if (!vte_terminal_get_enable_a11y (terminal)) ++ return; ++ ++ _vte_debug_print (vte::debug::category::ALLY, ++ "Text scrolled by {} lines", delta); ++ ++ vte_accessible_text_contents_reset (next); ++ vte_accessible_text_contents_snapshot (next, state->terminal); ++ ++ if (delta > 0) { ++ /* Scrolling down: lines at the top disappeared, new lines appeared at bottom */ ++ gsize lines_to_remove = MIN(delta, char_positions_get_size(&prev->linebreaks)); ++ if (lines_to_remove > 0 && char_positions_get_size(&prev->linebreaks) > 0) { ++ /* Find how many characters were in the removed lines */ ++ gsize chars_removed = 0; ++ if (lines_to_remove < char_positions_get_size(&prev->linebreaks)) { ++ chars_removed = *char_positions_index(&prev->linebreaks, lines_to_remove); ++ } else { ++ chars_removed = prev->n_chars; ++ } ++ ++ if (chars_removed > 0) { ++ /* Notify that text was removed from the beginning */ ++ gtk_accessible_text_update_contents(accessible, ++ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE, ++ 0, chars_removed); ++ ++ /* Notify that new text was added at the end */ ++ state->contents_flip = !state->contents_flip; ++ gtk_accessible_text_update_contents(accessible, ++ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT, ++ next->n_chars - chars_removed, next->n_chars); ++ } ++ } ++ } else if (delta < 0) { ++ /* Scrolling up: lines at the bottom disappeared, new lines appeared at top */ ++ gsize lines_to_remove = MIN(-delta, char_positions_get_size(&prev->linebreaks)); ++ if (lines_to_remove > 0 && char_positions_get_size(&prev->linebreaks) > 0) { ++ /* Find how many characters were in the removed lines from bottom */ ++ gsize start_remove = char_positions_get_size(&prev->linebreaks) - lines_to_remove; ++ gsize chars_removed = 0; ++ if (start_remove < char_positions_get_size(&prev->linebreaks)) { ++ gsize remove_start_pos = *char_positions_index(&prev->linebreaks, start_remove); ++ chars_removed = prev->n_chars - remove_start_pos; ++ } else { ++ chars_removed = prev->n_chars; ++ } ++ ++ if (chars_removed > 0) { ++ /* Notify that text was removed from the end */ ++ gtk_accessible_text_update_contents(accessible, ++ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE, ++ prev->n_chars - chars_removed, prev->n_chars); ++ ++ /* Notify that new text was added at the beginning */ ++ state->contents_flip = !state->contents_flip; ++ gtk_accessible_text_update_contents(accessible, ++ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT, ++ 0, chars_removed); ++ } ++ } ++ } ++ state->text_scrolled = TRUE; ++} +diff --git a/src/vteaccess-gtk4.h b/src/vteaccess-gtk4.h +index 37b09c7b3..cd79d7131 100644 +--- a/src/vteaccess-gtk4.h ++++ b/src/vteaccess-gtk4.h +@@ -21,5 +21,6 @@ G_BEGIN_DECLS + + void _vte_accessible_text_iface_init (GtkAccessibleTextInterface *iface); + void _vte_accessible_text_init (GtkAccessibleText *accessible); ++void _vte_accessible_text_scrolled (GtkAccessibleText *accessible, long delta); + + G_END_DECLS +diff --git a/src/vteinternal.hh b/src/vteinternal.hh +index 104042a86..636d03b97 100644 +--- a/src/vteinternal.hh ++++ b/src/vteinternal.hh +@@ -88,7 +88,8 @@ static_assert(CHAR_BIT == 8, "Weird"); + #if WITH_A11Y + #if VTE_GTK == 3 + #include "vteaccess.h" +-#else ++#elif VTE_GTK == 4 ++#include "vteaccess-gtk4.h" + #endif + #endif + +@@ -1431,20 +1432,24 @@ public: + _vte_terminal_accessible_text_modified(m_accessible.get()); + } + +- void emit_text_scrolled(long delta) +- { +- if (m_accessible) +- _vte_terminal_accessible_text_scrolled(m_accessible.get(), delta); +- } +- + #else + + inline constexpr void emit_text_deleted() const noexcept { } + inline constexpr void emit_text_inserted() const noexcept { } + inline constexpr void emit_text_modified() const noexcept { } +- inline constexpr void emit_text_scrolled(long delta) const noexcept { } + +-#endif /* WITH_A11Y && VTE_GTK == 3*/ ++#endif /* WITH_A11Y && (VTE_GTK == 3 || VTE_GTK == 4)*/ ++ ++ void emit_text_scrolled(long delta) ++ { ++#if WITH_A11Y && VTE_GTK == 3 ++ if (m_accessible) ++ _vte_terminal_accessible_text_scrolled(m_accessible.get(), delta); ++#elif WITH_A11Y && VTE_GTK == 4 ++ if (m_widget) ++ _vte_accessible_text_scrolled(GTK_ACCESSIBLE_TEXT(m_widget), delta); ++#endif ++ } + + bool m_no_legacy_signals{false}; + +-- +GitLab + diff --git a/a11y-line-counting.patch b/a11y-line-counting.patch new file mode 100644 index 0000000..385cd4f --- /dev/null +++ b/a11y-line-counting.patch @@ -0,0 +1,30 @@ +From 1fc98911a0de338897e76ddec8d0682217fa5753 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tyrychtr?= +Date: Mon, 14 Apr 2025 15:48:02 +0200 +Subject: [PATCH] vte-access-gtk4: Fix line counting during a line query + +We were comparing the byte offset of the character to the next line start. +However, the line start index is in characters, not byte offsets. So, with +enough multi-byte characters, we started returning nonsense. + +Fixes orca#588. +--- + src/vteaccess-gtk4.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vteaccess-gtk4.cc b/src/vteaccess-gtk4.cc +index efd89fdbc..9fe91ac96 100644 +--- a/src/vteaccess-gtk4.cc ++++ b/src/vteaccess-gtk4.cc +@@ -475,7 +475,7 @@ vte_accessible_text_get_contents_at (GtkAccessibleText *accessible, + line++) { + guint line_offset = *char_positions_index (&contents->linebreaks, line); + +- if (line_offset > char_offset) { ++ if (line_offset > offset) { + line--; + break; + } +-- +GitLab + diff --git a/a11y-range-per-text-attribute.patch b/a11y-range-per-text-attribute.patch new file mode 100644 index 0000000..21bb4ed --- /dev/null +++ b/a11y-range-per-text-attribute.patch @@ -0,0 +1,37 @@ +From 52529a4787a358dcff4c2e22911b30602f9d5048 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tyrychtr?= +Date: Fri, 2 May 2025 15:09:49 +0200 +Subject: [PATCH] vteaccess-gtk4: Return a range per text attribute + +The docs say that a text attribute is composed of a range,, name and value. +We were returning only one range, though, so the code in Gtk counting on +the fact that n_ranges was also the number of attributes, was confused. +As a result, we were always only returning the first text attribute. +--- + src/vteaccess-gtk4.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/vteaccess-gtk4.cc b/src/vteaccess-gtk4.cc +index b886d2c6c..539346f38 100644 +--- a/src/vteaccess-gtk4.cc ++++ b/src/vteaccess-gtk4.cc +@@ -687,12 +687,14 @@ vte_accessible_text_get_attributes (GtkAccessibleText *accessible, + + *attribute_names = g_new0 (char *, n_attrs + 1); + *attribute_values = g_new0 (char *, n_attrs + 1); +- *n_ranges = 1; +- *ranges = (GtkAccessibleTextRange *)g_memdup2 (&range, sizeof range); ++ *n_ranges = n_attrs; ++ *ranges = g_new (GtkAccessibleTextRange, n_attrs); + + for (i = 0; i < n_attrs; i++) { + (*attribute_names)[i] = g_strdup (attrs[i].name); + (*attribute_values)[i] = g_strdup (attrs[i].value); ++ (*ranges)[i].start = range.start; ++ (*ranges)[i].length = range.length; + } + + return TRUE; +-- +GitLab + diff --git a/fix-backspace.patch b/fix-backspace.patch new file mode 100644 index 0000000..f97e1d6 --- /dev/null +++ b/fix-backspace.patch @@ -0,0 +1,27 @@ +From 35573b12658daf4c25f8ee4f77b743af5ff8465f Mon Sep 17 00:00:00 2001 +From: Christian Persch +Date: Sun, 31 Aug 2025 20:33:16 +0200 +Subject: [PATCH] emulation: Fix XTRQTCAP response for Backspace key + +https://gitlab.gnome.org/GNOME/vte/-/issues/2897 +(cherry picked from commit bb0e930f446812f4b15d97f1f26566006925f7ac) +--- + src/vteseq.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/vteseq.cc b/src/vteseq.cc +index bbf7d276c..8821d73d3 100644 +--- a/src/vteseq.cc ++++ b/src/vteseq.cc +@@ -9817,7 +9817,7 @@ try + char* normal = nullptr; + auto len = 0uz; + auto suppress = false, add_modifiers = false; +- map_erase_binding(m_delete_binding, ++ map_erase_binding(keycode == GDK_KEY_Delete ? m_delete_binding : m_backspace_binding, + keycode == GDK_KEY_Delete ? EraseMode::eDELETE_SEQUENCE : EraseMode::eTTY, + state, + normal, +-- +GitLab + diff --git a/vte291.spec b/vte291.spec index 3e7eda1..16fc9bb 100644 --- a/vte291.spec +++ b/vte291.spec @@ -24,7 +24,17 @@ URL: https://wiki.gnome.org/Apps/Terminal/VTE Source0: https://download.gnome.org/sources/vte/0.81/vte-%{version}.tar.xz # https://gitlab.gnome.org/GNOME/vte/-/merge_requests/2 -Patch0: 0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch +Patch: 0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch + +# https://gitlab.gnome.org/GNOME/vte/-/merge_requests/4 +Patch: a11y-line-counting.patch +# https://gitlab.gnome.org/GNOME/vte/-/merge_requests/6 +Patch: a11y-range-per-text-attribute.patch +# https://gitlab.gnome.org/GNOME/vte/-/merge_requests/7 +Patch: a11y-granular-scroll-notifications.patch + +# https://gitlab.gnome.org/GNOME/vte/-/issues/2897 +Patch: fix-backspace.patch BuildRequires: pkgconfig(fmt) >= %{fmt_version} BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} From 754f52437b9d8e6ab532a762efd4d65f3f81fbd1 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Tue, 16 Sep 2025 14:23:02 -0500 Subject: [PATCH 085/102] Update to 0.82.0 Also, add a bcond to control whether we use bundled fast_float or system fast_float. --- ...oat-when-std-from_chars-is-insuffici.patch | 128 ------------ a11y-granular-scroll-notifications.patch | 197 ------------------ a11y-line-counting.patch | 30 --- a11y-range-per-text-attribute.patch | 37 ---- fix-backspace.patch | 27 --- sources | 2 +- vte291.spec | 39 ++-- 7 files changed, 24 insertions(+), 436 deletions(-) delete mode 100644 0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch delete mode 100644 a11y-granular-scroll-notifications.patch delete mode 100644 a11y-line-counting.patch delete mode 100644 a11y-range-per-text-attribute.patch delete mode 100644 fix-backspace.patch diff --git a/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch b/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch deleted file mode 100644 index 672fa27..0000000 --- a/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch +++ /dev/null @@ -1,128 +0,0 @@ -From 31a469d55774e8487003e26964c5e7e071ad8e84 Mon Sep 17 00:00:00 2001 -From: Yaakov Selkowitz -Date: Wed, 19 Feb 2025 13:43:15 -0500 -Subject: [PATCH] Only use fast_float when std::from_chars is insufficient - -When the default C++ standard library provides the necessary support, it -should be preferred over any supplementary library. This restores the -status quo for recent g++ while still supporting clang -stdlib=libc++ and -older g++. ---- - meson.build | 25 +++++++++++++++++++++++++ - src/color-parser.cc | 4 ++++ - src/parser-glue.hh | 5 +++++ - src/parser-test.cc | 2 ++ - src/properties.hh | 4 ++++ - 5 files changed, 40 insertions(+) - -diff --git a/meson.build b/meson.build -index 5a53eeda..fb80a52e 100644 ---- a/meson.build -+++ b/meson.build -@@ -730,6 +730,29 @@ config_h.set10('WITH_SYSTEMD', systemd_dep.found()) - # try compiling a test programme to see if the version is new enough. - - if cxx.compiles(''' -+ #include -+ #include -+ #include -+ -+ int main(void) { -+ auto str = "1234"; -+ auto start = str; -+ auto end = str + strlen(str); -+ auto value = uint64_t{}; -+ auto rv = std::from_chars(start, end, value, 16); -+ if (rv.ec != std::errc{} || rv.ptr != end) -+ return 2; -+ -+ return 0; -+ } -+ ''', -+ args: [ -+ cxx_std_opt, -+ ], -+ name: 'system std::from_chars usability check', -+ ) -+ fast_float_dep = dependency('', required: false) -+elif cxx.compiles(''' - #include - #include - #include -@@ -756,6 +779,8 @@ else - fast_float_dep = dependency('fast_float', required: true) - endif - -+config_h.set10('WITH_FAST_FLOAT', fast_float_dep.found()) -+ - # Write config.h - - config_sources = [ -diff --git a/src/color-parser.cc b/src/color-parser.cc -index e6a813be..1d6175d6 100644 ---- a/src/color-parser.cc -+++ b/src/color-parser.cc -@@ -29,7 +29,11 @@ - - #include - -+#if WITH_FAST_FLOAT - #include -+#else -+#define fast_float std -+#endif - - #include - -diff --git a/src/parser-glue.hh b/src/parser-glue.hh -index e129c1a2..e43f864e 100644 ---- a/src/parser-glue.hh -+++ b/src/parser-glue.hh -@@ -26,7 +26,12 @@ - - #include "debug.hh" - -+#if WITH_FAST_FLOAT - #include -+#else -+#include -+#define fast_float std -+#endif - - #include - -diff --git a/src/parser-test.cc b/src/parser-test.cc -index e076bb49..42430cd6 100644 ---- a/src/parser-test.cc -+++ b/src/parser-test.cc -@@ -1738,9 +1738,11 @@ main(int argc, - g_test_add_func("/vte/parser/sequences/glue/uchar", test_seq_glue_uchar); - g_test_add_func("/vte/parser/sequences/glue/string", test_seq_glue_string); - g_test_add_func("/vte/parser/sequences/glue/string-tokeniser/char", test_seq_glue_string_tokeniser); -+#if HAVE_FAST_FLOAT - // requires newest fast_float - // g_test_add_func("/vte/parser/sequences/glue/string-tokeniser/char8_t", test_seq_glue_string_tokeniser); - g_test_add_func("/vte/parser/sequences/glue/string-tokeniser/char32_t", test_seq_glue_string_tokeniser); -+#endif - g_test_add_func("/vte/parser/sequences/glue/sequence-builder", test_seq_glue_sequence_builder); - g_test_add_func("/vte/parser/sequences/control", test_seq_control); - g_test_add_func("/vte/parser/sequences/escape/invalid", test_seq_esc_invalid); -diff --git a/src/properties.hh b/src/properties.hh -index 58e1d2c9..9757bf54 100644 ---- a/src/properties.hh -+++ b/src/properties.hh -@@ -40,7 +40,11 @@ - #include - #include - -+#if WITH_FAST_FLOAT - #include -+#else -+#define fast_float std -+#endif - - namespace vte::property { - --- -2.50.1 - diff --git a/a11y-granular-scroll-notifications.patch b/a11y-granular-scroll-notifications.patch deleted file mode 100644 index 1ef57d6..0000000 --- a/a11y-granular-scroll-notifications.patch +++ /dev/null @@ -1,197 +0,0 @@ -From f685d94c79e03d352bdb9a567268db233066aed5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tyrychtr?= -Date: Wed, 20 Aug 2025 14:34:20 +0200 -Subject: [PATCH] vteaccess-gtk4: Implement granular notifications upon - scrolling - -This MR implements the missing scroll notifications, which are much more -semantic than the previous ones which only relied on the changed text. - -Fixes #2877 ---- - src/vteaccess-gtk4.cc | 88 +++++++++++++++++++++++++++++++++++++++++-- - src/vteaccess-gtk4.h | 1 + - src/vteinternal.hh | 23 ++++++----- - 3 files changed, 100 insertions(+), 12 deletions(-) - -diff --git a/src/vteaccess-gtk4.cc b/src/vteaccess-gtk4.cc -index b886d2c6c..e626bb274 100644 ---- a/src/vteaccess-gtk4.cc -+++ b/src/vteaccess-gtk4.cc -@@ -75,6 +75,7 @@ typedef struct _VteAccessibleText - VteTerminal *terminal; - VteAccessibleTextContents contents[2]; - guint contents_flip : 1; -+ guint text_scrolled : 1; - } VteAccessibleText; - - static inline gboolean -@@ -816,6 +817,11 @@ vte_accessible_text_contents_changed (VteTerminal *terminal, - if (!vte_terminal_get_enable_a11y (terminal)) - return; - -+ if (state->text_scrolled) { -+ state->text_scrolled = FALSE; -+ return; -+ } -+ - prev = &state->contents[state->contents_flip]; - next = &state->contents[!state->contents_flip]; - -@@ -839,12 +845,11 @@ vte_accessible_text_contents_changed (VteTerminal *terminal, - /* NOTE: - * - * The code below is based upon what vteaccess.cc did for GTK 3. -- * It does not do any sort of appropriate diffing to try to handle -- * scrolling correctly. That would be a good idea to implement in -- * the longer term. - * - * It just looks for a long prefix match, and then a long suffix - * match and attempts to diff what is between those to end points. -+ * -+ * Scrolling based changes are handled separately. - */ - - const char *prevc = prevstr; -@@ -1017,3 +1022,80 @@ _vte_accessible_text_init (GtkAccessibleText *accessible) - GTK_ACCESSIBLE_PROPERTY_MULTI_LINE, TRUE, - GTK_ACCESSIBLE_VALUE_UNDEFINED); - } -+ -+void -+_vte_accessible_text_scrolled (GtkAccessibleText *accessible, long delta) -+{ -+ VteTerminal *terminal = VTE_TERMINAL (accessible); -+ VteAccessibleText *state = vte_accessible_text_get (terminal); -+ VteAccessibleTextContents *prev = &state->contents[state->contents_flip]; -+ VteAccessibleTextContents *next = &state->contents[!state->contents_flip]; -+ -+ g_assert (VTE_IS_TERMINAL (terminal)); -+ g_assert (state != nullptr); -+ g_assert (state->terminal == terminal); -+ -+ if (!vte_terminal_get_enable_a11y (terminal)) -+ return; -+ -+ _vte_debug_print (vte::debug::category::ALLY, -+ "Text scrolled by {} lines", delta); -+ -+ vte_accessible_text_contents_reset (next); -+ vte_accessible_text_contents_snapshot (next, state->terminal); -+ -+ if (delta > 0) { -+ /* Scrolling down: lines at the top disappeared, new lines appeared at bottom */ -+ gsize lines_to_remove = MIN(delta, char_positions_get_size(&prev->linebreaks)); -+ if (lines_to_remove > 0 && char_positions_get_size(&prev->linebreaks) > 0) { -+ /* Find how many characters were in the removed lines */ -+ gsize chars_removed = 0; -+ if (lines_to_remove < char_positions_get_size(&prev->linebreaks)) { -+ chars_removed = *char_positions_index(&prev->linebreaks, lines_to_remove); -+ } else { -+ chars_removed = prev->n_chars; -+ } -+ -+ if (chars_removed > 0) { -+ /* Notify that text was removed from the beginning */ -+ gtk_accessible_text_update_contents(accessible, -+ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE, -+ 0, chars_removed); -+ -+ /* Notify that new text was added at the end */ -+ state->contents_flip = !state->contents_flip; -+ gtk_accessible_text_update_contents(accessible, -+ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT, -+ next->n_chars - chars_removed, next->n_chars); -+ } -+ } -+ } else if (delta < 0) { -+ /* Scrolling up: lines at the bottom disappeared, new lines appeared at top */ -+ gsize lines_to_remove = MIN(-delta, char_positions_get_size(&prev->linebreaks)); -+ if (lines_to_remove > 0 && char_positions_get_size(&prev->linebreaks) > 0) { -+ /* Find how many characters were in the removed lines from bottom */ -+ gsize start_remove = char_positions_get_size(&prev->linebreaks) - lines_to_remove; -+ gsize chars_removed = 0; -+ if (start_remove < char_positions_get_size(&prev->linebreaks)) { -+ gsize remove_start_pos = *char_positions_index(&prev->linebreaks, start_remove); -+ chars_removed = prev->n_chars - remove_start_pos; -+ } else { -+ chars_removed = prev->n_chars; -+ } -+ -+ if (chars_removed > 0) { -+ /* Notify that text was removed from the end */ -+ gtk_accessible_text_update_contents(accessible, -+ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_REMOVE, -+ prev->n_chars - chars_removed, prev->n_chars); -+ -+ /* Notify that new text was added at the beginning */ -+ state->contents_flip = !state->contents_flip; -+ gtk_accessible_text_update_contents(accessible, -+ GTK_ACCESSIBLE_TEXT_CONTENT_CHANGE_INSERT, -+ 0, chars_removed); -+ } -+ } -+ } -+ state->text_scrolled = TRUE; -+} -diff --git a/src/vteaccess-gtk4.h b/src/vteaccess-gtk4.h -index 37b09c7b3..cd79d7131 100644 ---- a/src/vteaccess-gtk4.h -+++ b/src/vteaccess-gtk4.h -@@ -21,5 +21,6 @@ G_BEGIN_DECLS - - void _vte_accessible_text_iface_init (GtkAccessibleTextInterface *iface); - void _vte_accessible_text_init (GtkAccessibleText *accessible); -+void _vte_accessible_text_scrolled (GtkAccessibleText *accessible, long delta); - - G_END_DECLS -diff --git a/src/vteinternal.hh b/src/vteinternal.hh -index 104042a86..636d03b97 100644 ---- a/src/vteinternal.hh -+++ b/src/vteinternal.hh -@@ -88,7 +88,8 @@ static_assert(CHAR_BIT == 8, "Weird"); - #if WITH_A11Y - #if VTE_GTK == 3 - #include "vteaccess.h" --#else -+#elif VTE_GTK == 4 -+#include "vteaccess-gtk4.h" - #endif - #endif - -@@ -1431,20 +1432,24 @@ public: - _vte_terminal_accessible_text_modified(m_accessible.get()); - } - -- void emit_text_scrolled(long delta) -- { -- if (m_accessible) -- _vte_terminal_accessible_text_scrolled(m_accessible.get(), delta); -- } -- - #else - - inline constexpr void emit_text_deleted() const noexcept { } - inline constexpr void emit_text_inserted() const noexcept { } - inline constexpr void emit_text_modified() const noexcept { } -- inline constexpr void emit_text_scrolled(long delta) const noexcept { } - --#endif /* WITH_A11Y && VTE_GTK == 3*/ -+#endif /* WITH_A11Y && (VTE_GTK == 3 || VTE_GTK == 4)*/ -+ -+ void emit_text_scrolled(long delta) -+ { -+#if WITH_A11Y && VTE_GTK == 3 -+ if (m_accessible) -+ _vte_terminal_accessible_text_scrolled(m_accessible.get(), delta); -+#elif WITH_A11Y && VTE_GTK == 4 -+ if (m_widget) -+ _vte_accessible_text_scrolled(GTK_ACCESSIBLE_TEXT(m_widget), delta); -+#endif -+ } - - bool m_no_legacy_signals{false}; - --- -GitLab - diff --git a/a11y-line-counting.patch b/a11y-line-counting.patch deleted file mode 100644 index 385cd4f..0000000 --- a/a11y-line-counting.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 1fc98911a0de338897e76ddec8d0682217fa5753 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tyrychtr?= -Date: Mon, 14 Apr 2025 15:48:02 +0200 -Subject: [PATCH] vte-access-gtk4: Fix line counting during a line query - -We were comparing the byte offset of the character to the next line start. -However, the line start index is in characters, not byte offsets. So, with -enough multi-byte characters, we started returning nonsense. - -Fixes orca#588. ---- - src/vteaccess-gtk4.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/vteaccess-gtk4.cc b/src/vteaccess-gtk4.cc -index efd89fdbc..9fe91ac96 100644 ---- a/src/vteaccess-gtk4.cc -+++ b/src/vteaccess-gtk4.cc -@@ -475,7 +475,7 @@ vte_accessible_text_get_contents_at (GtkAccessibleText *accessible, - line++) { - guint line_offset = *char_positions_index (&contents->linebreaks, line); - -- if (line_offset > char_offset) { -+ if (line_offset > offset) { - line--; - break; - } --- -GitLab - diff --git a/a11y-range-per-text-attribute.patch b/a11y-range-per-text-attribute.patch deleted file mode 100644 index 21bb4ed..0000000 --- a/a11y-range-per-text-attribute.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 52529a4787a358dcff4c2e22911b30602f9d5048 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tyrychtr?= -Date: Fri, 2 May 2025 15:09:49 +0200 -Subject: [PATCH] vteaccess-gtk4: Return a range per text attribute - -The docs say that a text attribute is composed of a range,, name and value. -We were returning only one range, though, so the code in Gtk counting on -the fact that n_ranges was also the number of attributes, was confused. -As a result, we were always only returning the first text attribute. ---- - src/vteaccess-gtk4.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/vteaccess-gtk4.cc b/src/vteaccess-gtk4.cc -index b886d2c6c..539346f38 100644 ---- a/src/vteaccess-gtk4.cc -+++ b/src/vteaccess-gtk4.cc -@@ -687,12 +687,14 @@ vte_accessible_text_get_attributes (GtkAccessibleText *accessible, - - *attribute_names = g_new0 (char *, n_attrs + 1); - *attribute_values = g_new0 (char *, n_attrs + 1); -- *n_ranges = 1; -- *ranges = (GtkAccessibleTextRange *)g_memdup2 (&range, sizeof range); -+ *n_ranges = n_attrs; -+ *ranges = g_new (GtkAccessibleTextRange, n_attrs); - - for (i = 0; i < n_attrs; i++) { - (*attribute_names)[i] = g_strdup (attrs[i].name); - (*attribute_values)[i] = g_strdup (attrs[i].value); -+ (*ranges)[i].start = range.start; -+ (*ranges)[i].length = range.length; - } - - return TRUE; --- -GitLab - diff --git a/fix-backspace.patch b/fix-backspace.patch deleted file mode 100644 index f97e1d6..0000000 --- a/fix-backspace.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 35573b12658daf4c25f8ee4f77b743af5ff8465f Mon Sep 17 00:00:00 2001 -From: Christian Persch -Date: Sun, 31 Aug 2025 20:33:16 +0200 -Subject: [PATCH] emulation: Fix XTRQTCAP response for Backspace key - -https://gitlab.gnome.org/GNOME/vte/-/issues/2897 -(cherry picked from commit bb0e930f446812f4b15d97f1f26566006925f7ac) ---- - src/vteseq.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/vteseq.cc b/src/vteseq.cc -index bbf7d276c..8821d73d3 100644 ---- a/src/vteseq.cc -+++ b/src/vteseq.cc -@@ -9817,7 +9817,7 @@ try - char* normal = nullptr; - auto len = 0uz; - auto suppress = false, add_modifiers = false; -- map_erase_binding(m_delete_binding, -+ map_erase_binding(keycode == GDK_KEY_Delete ? m_delete_binding : m_backspace_binding, - keycode == GDK_KEY_Delete ? EraseMode::eDELETE_SEQUENCE : EraseMode::eTTY, - state, - normal, --- -GitLab - diff --git a/sources b/sources index 3e03cef..f44bed4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.81.90.tar.xz) = 733ebde781fde8838a2f1151c733c5d669b07bc8033379bd61931786c16f7f79296ead197b3ecafe2d9a95bce086b4f8f54e090a90cc4cfa8ce07ac3538d2388 +SHA512 (vte-0.82.0.tar.xz) = 82d42c0824fde365cdef9e23a0ab1a01434275ca92383bdd3efc8074498f192821473103447f8667c785170886959bf22df5a2cc0d7d5375439e078402fd889f diff --git a/vte291.spec b/vte291.spec index 16fc9bb..b2a2d14 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,8 +12,14 @@ %global pcre2_version 10.21 %global simdutf_version 7.2.1 +%if 1 +%bcond bundled_fast_float 1 +%else +%bcond bundled_fast_float 0 +%endif + Name: vte291 -Version: 0.81.90 +Version: 0.82.0 Release: %autorelease Summary: GTK terminal emulator library @@ -21,20 +27,7 @@ Summary: GTK terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.81/vte-%{version}.tar.xz - -# https://gitlab.gnome.org/GNOME/vte/-/merge_requests/2 -Patch: 0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch - -# https://gitlab.gnome.org/GNOME/vte/-/merge_requests/4 -Patch: a11y-line-counting.patch -# https://gitlab.gnome.org/GNOME/vte/-/merge_requests/6 -Patch: a11y-range-per-text-attribute.patch -# https://gitlab.gnome.org/GNOME/vte/-/merge_requests/7 -Patch: a11y-granular-scroll-notifications.patch - -# https://gitlab.gnome.org/GNOME/vte/-/issues/2897 -Patch: fix-backspace.patch +Source0: https://download.gnome.org/sources/vte/0.82/vte-%{version}.tar.xz BuildRequires: pkgconfig(fmt) >= %{fmt_version} BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} @@ -59,6 +52,10 @@ BuildRequires: meson BuildRequires: systemd-rpm-macros BuildRequires: vala +%if %{without bundled_fast_float} +BuildRequires: fast_float-devel +%endif + Requires: fribidi >= %{fribidi_version} Requires: glib2 >= %{glib2_version} Requires: gnutls%{?_isa} >= %{gnutls_version} @@ -69,7 +66,9 @@ Requires: pcre2%{?_isa} >= %{pcre2_version} Requires: systemd-libs%{?_isa} >= %{libsystemd_version} Requires: vte-profile -Conflicts: gnome-terminal < 3.20.1-2 +%if %{with bundled_fast_float} +Provides: bundled(fast_float) +%endif %description VTE is a library implementing a terminal emulator widget for GTK+. VTE @@ -145,6 +144,14 @@ emulator library. sed -i -e "/^vte_systemduserunitdir =/s|vte_prefix|'/usr'|" meson.build %endif +# Guarantee we don't accidentally use subprojects if a new subproject is added. +%if %{with bundled_fast_float} +rm -rf subprojects/fmt/ +rm -rf subprojects/simdutf/ +%else +rm -rf subprojects/ +%endif + %build %meson --buildtype=plain -Ddocs=true -Dgtk3=true -Dgtk4=true %meson_build From 05916348c17cacf8e9534f6c5f0d4f91fc7a128f Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Tue, 16 Sep 2025 18:15:33 -0500 Subject: [PATCH 086/102] Fix fast_float bcond condition --- vte291.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index b2a2d14..8746c38 100644 --- a/vte291.spec +++ b/vte291.spec @@ -12,7 +12,7 @@ %global pcre2_version 10.21 %global simdutf_version 7.2.1 -%if 1 +%if 0%{?rhel} %bcond bundled_fast_float 1 %else %bcond bundled_fast_float 0 From 3415f78862974c04c496e43365ab4fa6fc90084b Mon Sep 17 00:00:00 2001 From: Petr Schindler Date: Mon, 13 Oct 2025 21:51:42 +0200 Subject: [PATCH 087/102] Update to 0.82.1 --- sources | 2 +- vte291.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index f44bed4..0fb6472 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.82.0.tar.xz) = 82d42c0824fde365cdef9e23a0ab1a01434275ca92383bdd3efc8074498f192821473103447f8667c785170886959bf22df5a2cc0d7d5375439e078402fd889f +SHA512 (vte-0.82.1.tar.xz) = b636a96ed0ee066be2939e4cfebca63bb92414fd6f16287d9c0c814093e057d0b19bf0c4df76dca4816f893f1b49a6171f3bb94bb1e40a255517fe2695bea634 diff --git a/vte291.spec b/vte291.spec index 8746c38..d6435fd 100644 --- a/vte291.spec +++ b/vte291.spec @@ -19,7 +19,7 @@ %endif Name: vte291 -Version: 0.82.0 +Version: 0.82.1 Release: %autorelease Summary: GTK terminal emulator library From b28a1d52fc11fc5ce10d1cfffe75192ff7c93972 Mon Sep 17 00:00:00 2001 From: Adrian Vovk Date: Tue, 9 Dec 2025 20:44:00 -0500 Subject: [PATCH 088/102] Update to 0.82.2 --- sources | 2 +- vte291.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 0fb6472..2c42b34 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.82.1.tar.xz) = b636a96ed0ee066be2939e4cfebca63bb92414fd6f16287d9c0c814093e057d0b19bf0c4df76dca4816f893f1b49a6171f3bb94bb1e40a255517fe2695bea634 +SHA512 (vte-0.82.2.tar.xz) = 73e90beec2672c04476d6673eeac448860faaa00e507f71f6c36122b38bbb5857b2d0b876a928254348ef0f006f5a091e0f09179d23d74d1e05bdbba28c65f74 diff --git a/vte291.spec b/vte291.spec index d6435fd..5449d8a 100644 --- a/vte291.spec +++ b/vte291.spec @@ -19,7 +19,7 @@ %endif Name: vte291 -Version: 0.82.1 +Version: 0.82.2 Release: %autorelease Summary: GTK terminal emulator library From ba10e7b8e56a5cc448687580b46aa49a78fde10c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 20:04:39 +0000 Subject: [PATCH 089/102] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From b48d579b6e725e9ac2541e7fc1767669ec65ef4c Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 19 Jan 2026 20:29:13 +0100 Subject: [PATCH 090/102] Update to 0.82.3 --- sources | 2 +- vte291.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 2c42b34..9ce8ebf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.82.2.tar.xz) = 73e90beec2672c04476d6673eeac448860faaa00e507f71f6c36122b38bbb5857b2d0b876a928254348ef0f006f5a091e0f09179d23d74d1e05bdbba28c65f74 +SHA512 (vte-0.82.3.tar.xz) = 4b03ff539ea0240b2fe814c4523da248e9b201beb68439990f9590fd8f75024e869e06bf07c2afc06258b588b6750bdb776a1505662c991fddced39adbed15d8 diff --git a/vte291.spec b/vte291.spec index 5449d8a..676cc14 100644 --- a/vte291.spec +++ b/vte291.spec @@ -19,7 +19,7 @@ %endif Name: vte291 -Version: 0.82.2 +Version: 0.82.3 Release: %autorelease Summary: GTK terminal emulator library From 6807a69cfcc4ec2de2dffb7ccd5de4272f4fa196 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 3 Feb 2026 15:28:47 +0100 Subject: [PATCH 091/102] Update to 0.83.90 --- sources | 2 +- vte291.spec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 9ce8ebf..1a9a1d5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.82.3.tar.xz) = 4b03ff539ea0240b2fe814c4523da248e9b201beb68439990f9590fd8f75024e869e06bf07c2afc06258b588b6750bdb776a1505662c991fddced39adbed15d8 +SHA512 (vte-0.83.90.tar.xz) = 000aa173f9333028576c6a78e24b00e090d9361e31ecf76ae5e5ae0c9f8e31fdcf67817c3d135e71dca16389376a40b25d8803727ade96ccbb9522a832ff8056 diff --git a/vte291.spec b/vte291.spec index 676cc14..478d9c6 100644 --- a/vte291.spec +++ b/vte291.spec @@ -19,7 +19,7 @@ %endif Name: vte291 -Version: 0.82.3 +Version: 0.83.90 Release: %autorelease Summary: GTK terminal emulator library @@ -27,7 +27,7 @@ Summary: GTK terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.82/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.83/vte-%{version}.tar.xz BuildRequires: pkgconfig(fmt) >= %{fmt_version} BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} From e772ad825ffa6f5d38ec7be6f9e55826e2274bba Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 24 Feb 2026 08:32:52 +0100 Subject: [PATCH 092/102] Onboard to Packit for stable Fedora branches --- .packit.yaml | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .packit.yaml diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..b1b62fd --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,59 @@ +# Minimal Packit Configuration for GNOME Packages +# Copy this to your dist-git repository as .packit.yaml +# +# Prerequisites: +# - Package is monitored by release-monitoring.org +# - Monitoring status set to "Monitoring" in dist-git + +# Required for tag filtering (release-monitoring also tracks alpha/beta) +upstream_project_url: https://gitlab.gnome.org/GNOME/vte + +jobs: + # Automated updates for stable branches + - job: pull_from_upstream + trigger: release + # Packit does the full update (spec, changelog) on the latest stable branch. + # The exact same commit is reused to open PRs for all other stable branches, + # which can be merged with fast-forward only (git merge --ff-only), + # keeping a linear, non-divergent history across branches. + dist_git_branches: + fedora-latest-stable: + fast_forward_merge_into: + - fedora-stable + + # ======================================================================== + # VERSIONING: Choose ONE option based on your package's versioning scheme + # ======================================================================== + + # OPTION A: Major version only - allows minor and patch updates + # For 2-digit: 50.0 -> 50.1 ✅, 50.x -> 51.0 ❌ + # For 3-digit: 1.2.3 -> 1.3.0 ✅, 1.x.x -> 2.0.0 ❌ + # Use for: GNOME apps/libs with 2-digit versions, or libraries following semver + # version_update_mask: '^\d+\.' + + # OPTION B: Major.minor version - patch updates only + # Examples: 1.2.3 -> 1.2.4 ✅, 1.2.x -> 1.3.0 ❌ + # Use for: Libraries with ABI concerns, even/odd development scheme + version_update_mask: '^\d+\.\d+\.' + + # ======================================================================== + # TAG FILTERING - Filter out pre-releases from release-monitoring + # ======================================================================== + # Required because release-monitoring.org also tracks alpha/beta/rc + upstream_tag_exclude: '.*(alpha|beta|rc).*' + + # Optional - only include stable release tags: + # upstream_tag_include: '^\d+\.\d+$' # For 2-digit versions + # upstream_tag_include: '^\d+\.\d+\.\d+$' # For 3-digit versions + + # Build in Koji after merge + - job: koji_build + trigger: commit + dist_git_branches: + - fedora-stable + + # Submit Bodhi update + - job: bodhi_update + trigger: commit + dist_git_branches: + - fedora-stable From 282f22b791c1ccb6a93fa588e5c887f3bf03dae8 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 25 Feb 2026 12:57:57 +0100 Subject: [PATCH 093/102] Packit: drop fast_forward_merge_into as current stable branches diverge --- .packit.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index b1b62fd..3705e72 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -12,14 +12,8 @@ jobs: # Automated updates for stable branches - job: pull_from_upstream trigger: release - # Packit does the full update (spec, changelog) on the latest stable branch. - # The exact same commit is reused to open PRs for all other stable branches, - # which can be merged with fast-forward only (git merge --ff-only), - # keeping a linear, non-divergent history across branches. dist_git_branches: - fedora-latest-stable: - fast_forward_merge_into: - - fedora-stable + - fedora-stable # ======================================================================== # VERSIONING: Choose ONE option based on your package's versioning scheme From d000632996a9a1e237519cd6b6131d9a90e4c0fe Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 2 Mar 2026 09:57:11 +0100 Subject: [PATCH 094/102] Packit: drop upstream_project_url and rely on release-monitoring only --- .packit.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.packit.yaml b/.packit.yaml index 3705e72..c3700e1 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -5,9 +5,6 @@ # - Package is monitored by release-monitoring.org # - Monitoring status set to "Monitoring" in dist-git -# Required for tag filtering (release-monitoring also tracks alpha/beta) -upstream_project_url: https://gitlab.gnome.org/GNOME/vte - jobs: # Automated updates for stable branches - job: pull_from_upstream @@ -30,16 +27,6 @@ jobs: # Use for: Libraries with ABI concerns, even/odd development scheme version_update_mask: '^\d+\.\d+\.' - # ======================================================================== - # TAG FILTERING - Filter out pre-releases from release-monitoring - # ======================================================================== - # Required because release-monitoring.org also tracks alpha/beta/rc - upstream_tag_exclude: '.*(alpha|beta|rc).*' - - # Optional - only include stable release tags: - # upstream_tag_include: '^\d+\.\d+$' # For 2-digit versions - # upstream_tag_include: '^\d+\.\d+\.\d+$' # For 3-digit versions - # Build in Koji after merge - job: koji_build trigger: commit From 9923e7d419e5c0dcbaa05b4fd950064456336328 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Tue, 3 Mar 2026 09:29:18 +0100 Subject: [PATCH 095/102] Update to 0.83.91 --- sources | 2 +- vte291.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 1a9a1d5..ef13cf1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.83.90.tar.xz) = 000aa173f9333028576c6a78e24b00e090d9361e31ecf76ae5e5ae0c9f8e31fdcf67817c3d135e71dca16389376a40b25d8803727ade96ccbb9522a832ff8056 +SHA512 (vte-0.83.91.tar.xz) = 5e3638bd31c71ff194a4f83527f7be87480df493dd5507d884b62af25c148801e862cb417395f3cf43b344fecf8a6ca480d0eddd2ed04ed6d22bdaced51b93fc diff --git a/vte291.spec b/vte291.spec index 478d9c6..b1af12c 100644 --- a/vte291.spec +++ b/vte291.spec @@ -19,7 +19,7 @@ %endif Name: vte291 -Version: 0.83.90 +Version: 0.83.91 Release: %autorelease Summary: GTK terminal emulator library From c9c2ccd922635817aecb7812ae6401ae0ccfc904 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 16 Mar 2026 12:27:24 +0100 Subject: [PATCH 096/102] Update to 0.84.0 --- sources | 2 +- vte291.spec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sources b/sources index ef13cf1..5d81e53 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.83.91.tar.xz) = 5e3638bd31c71ff194a4f83527f7be87480df493dd5507d884b62af25c148801e862cb417395f3cf43b344fecf8a6ca480d0eddd2ed04ed6d22bdaced51b93fc +SHA512 (vte-0.84.0.tar.xz) = 76f26a46d55da107458682de82dc620aec5da3a89d813628c31764b2f06805435ee976e43326d792ca55c5db310da37667a6b8094bd12e6c09084d30b0332eb6 diff --git a/vte291.spec b/vte291.spec index b1af12c..a2cd33b 100644 --- a/vte291.spec +++ b/vte291.spec @@ -19,7 +19,7 @@ %endif Name: vte291 -Version: 0.83.91 +Version: 0.84.0 Release: %autorelease Summary: GTK terminal emulator library @@ -27,7 +27,7 @@ Summary: GTK terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.83/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/0.84/vte-%{version}.tar.xz BuildRequires: pkgconfig(fmt) >= %{fmt_version} BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} From 692568d63ec8e35840cb00c40a509dbd46e49af3 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 17 Mar 2026 18:24:01 +0100 Subject: [PATCH 097/102] Add some helper code to avoid silly human errors [skip changelog] --- vte291.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vte291.spec b/vte291.spec index a2cd33b..791cdc4 100644 --- a/vte291.spec +++ b/vte291.spec @@ -18,6 +18,8 @@ %bcond bundled_fast_float 0 %endif +%global major_minor_version %%(echo %%{version} | cut -d "." -f 1-2) + Name: vte291 Version: 0.84.0 Release: %autorelease @@ -27,7 +29,7 @@ Summary: GTK terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/0.84/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/%{major_minor_version}/vte-%{version}.tar.xz BuildRequires: pkgconfig(fmt) >= %{fmt_version} BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} From 69346ba770ac6eaa71de933edb07fe4da77e01f2 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 25 Mar 2026 14:31:53 +0100 Subject: [PATCH 098/102] Add configuration for release-monitoring --- monitoring.toml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 monitoring.toml diff --git a/monitoring.toml b/monitoring.toml new file mode 100644 index 0000000..0ad7b11 --- /dev/null +++ b/monitoring.toml @@ -0,0 +1,13 @@ +# Enable/disable monitoring +monitoring = true +# Enable/disable filling bugzilla ticket for new release +# When disabled it will also disable scratch builds +bugzilla = false +# Enable/disable reporting only stable versions +# Stable versions are recognized based on release-monitoring.org project settings +stable_only = true +# Enable/disable reporting all new versions instead of the latest one +# Enabling this will disable scratch builds +all_versions = true +# Enable/disable scratch build for newly opened version +scratch_build = false From c0be57da94ad9db99eb4ee5f847743519aba5190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Mon, 8 Jun 2026 09:53:25 +0200 Subject: [PATCH 099/102] Rebuilt for icu 78.3 From b41d430d9c569c1cd2c0df559f4828f5de732ae2 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 3 Jul 2026 11:17:38 +0200 Subject: [PATCH 100/102] Use a gnome-srpm-macros macro [skip changelog] --- vte291.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vte291.spec b/vte291.spec index 791cdc4..71f2224 100644 --- a/vte291.spec +++ b/vte291.spec @@ -18,8 +18,6 @@ %bcond bundled_fast_float 0 %endif -%global major_minor_version %%(echo %%{version} | cut -d "." -f 1-2) - Name: vte291 Version: 0.84.0 Release: %autorelease @@ -29,7 +27,7 @@ Summary: GTK terminal emulator library License: GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND X11 AND CC-BY-4.0 URL: https://wiki.gnome.org/Apps/Terminal/VTE -Source0: https://download.gnome.org/sources/vte/%{major_minor_version}/vte-%{version}.tar.xz +Source0: https://download.gnome.org/sources/vte/%{gnome_major_minor_version}/vte-%{version}.tar.xz BuildRequires: pkgconfig(fmt) >= %{fmt_version} BuildRequires: pkgconfig(fribidi) >= %{fribidi_version} From 53df76d9fb27ca4e3727acfa5a4b17a406ede36a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:38:50 +0000 Subject: [PATCH 101/102] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild From 1c4e5b9266aa6ac71c630eaa7f2ac6c8f778100a Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 3 Aug 2026 08:58:13 +0200 Subject: [PATCH 102/102] Update to 0.84.1 --- sources | 2 +- vte291.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 5d81e53..c00fd0b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vte-0.84.0.tar.xz) = 76f26a46d55da107458682de82dc620aec5da3a89d813628c31764b2f06805435ee976e43326d792ca55c5db310da37667a6b8094bd12e6c09084d30b0332eb6 +SHA512 (vte-0.84.1.tar.xz) = 34ac77e712b12b62518a09122ce36c816e4c14a53b01be55f233c8749dd234b6b60a9ab47730e34be44fef1994364002a5f31a0af937e95ed1804752a8dd645e diff --git a/vte291.spec b/vte291.spec index 71f2224..de7241f 100644 --- a/vte291.spec +++ b/vte291.spec @@ -19,7 +19,7 @@ %endif Name: vte291 -Version: 0.84.0 +Version: 0.84.1 Release: %autorelease Summary: GTK terminal emulator library