From 889d5555b6e416f5278dea8a14260e594c010430 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 15 Oct 2013 11:00:14 +0100 Subject: [PATCH 1/3] Update to 0.34.9 --- .gitignore | 1 + sources | 2 +- vte3.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4fa060b..a3310f1 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /vte-0.34.6.tar.xz /vte-0.34.7.tar.xz /vte-0.34.8.tar.xz +/vte-0.34.9.tar.xz diff --git a/sources b/sources index b0bce1b..29e8e3a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b16a21d09322a41f6c82a0bdd8241467 vte-0.34.8.tar.xz +cb2f3cd4889581dcb61ab6db40bee542 vte-0.34.9.tar.xz diff --git a/vte3.spec b/vte3.spec index 48519de..8bfaebe 100644 --- a/vte3.spec +++ b/vte3.spec @@ -1,5 +1,5 @@ Name: vte3 -Version: 0.34.8 +Version: 0.34.9 Release: 1%{?dist} Summary: A terminal emulator License: LGPLv2+ @@ -90,6 +90,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %changelog +* Tue Oct 15 2013 Richard Hughes - 0.34.9-1 +- Update to 0.34.9 + * Wed Sep 18 2013 Kalev Lember - 0.34.8-1 - Update to 0.34.8 From 10e0e04595e407dea06b99f2c906ce7e78ae3e67 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 9 May 2014 15:47:16 -0400 Subject: [PATCH 2/3] Apply an upstream fix for xterm escape sequences --- vte-color-escape.patch | 203 +++++++++++++++++++++++++++++++++++++++++ vte3.spec | 8 +- 2 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 vte-color-escape.patch diff --git a/vte-color-escape.patch b/vte-color-escape.patch new file mode 100644 index 0000000..7fa692e --- /dev/null +++ b/vte-color-escape.patch @@ -0,0 +1,203 @@ +diff --git a/src/vte-private.h b/src/vte-private.h +index b7de21f..520b0f4 100644 +--- a/src/vte-private.h ++++ b/src/vte-private.h +@@ -342,8 +342,10 @@ struct _VteTerminalPrivate { + + gboolean palette_initialized; + gboolean highlight_color_set; ++ gboolean cursor_default_color_set; + gboolean cursor_color_set; +- PangoColor palette[VTE_PALETTE_SIZE]; ++ PangoColor default_palette[VTE_PALETTE_SIZE]; /* get/set via API calls */ ++ PangoColor palette[VTE_PALETTE_SIZE]; /* get/set via escape sequences */ + + /* Mouse cursors. */ + gboolean mouse_cursor_visible; +@@ -445,7 +447,11 @@ void _vte_terminal_visible_beep(VteTerminal *terminal); + void _vte_terminal_beep(VteTerminal *terminal); + void _vte_terminal_set_color_internal(VteTerminal *terminal, + int idx, ++ gboolean via_escape, + const GdkColor *color); ++void _vte_terminal_set_color_cursor_internal(VteTerminal *terminal, ++ gboolean via_escape, ++ const GdkColor *color); + + void _vte_terminal_inline_error_message(VteTerminal *terminal, const char *format, ...) G_GNUC_PRINTF(2,3); + +diff --git a/src/vte.c b/src/vte.c +index 0ad759d..2369978 100644 +--- a/src/vte.c ++++ b/src/vte.c +@@ -2501,11 +2501,15 @@ vte_terminal_new(void) + void + _vte_terminal_set_color_internal(VteTerminal *terminal, + int entry, ++ gboolean via_escape, + const GdkColor *proposed) + { + PangoColor *color; + +- color = &terminal->pvt->palette[entry]; ++ if (via_escape) ++ color = &terminal->pvt->palette[entry]; ++ else ++ color = &terminal->pvt->default_palette[entry]; + + if (color->red == proposed->red && + color->green == proposed->green && +@@ -2514,10 +2518,20 @@ _vte_terminal_set_color_internal(VteTerminal *terminal, + } + + _vte_debug_print(VTE_DEBUG_MISC, +- "Set color[%d] to (%04x,%04x,%04x).\n", entry, +- proposed->red, proposed->green, proposed->blue); ++ "Set %s color[%d] to (%04x,%04x,%04x).\n", via_escape ? "actual" : "default", ++ entry, proposed->red, proposed->green, proposed->blue); + + /* Save the requested color. */ ++ if (!via_escape) { ++ PangoColor *actual_color = &terminal->pvt->palette[entry]; ++ if (actual_color->red == color->red && ++ actual_color->green == color->green && ++ actual_color->blue == color->blue) { ++ actual_color->red = proposed->red; ++ actual_color->green = proposed->green; ++ actual_color->blue = proposed->blue; ++ } ++ } + color->red = proposed->red; + color->green = proposed->green; + color->blue = proposed->blue; +@@ -2603,7 +2617,7 @@ vte_terminal_set_color_bold(VteTerminal *terminal, const GdkColor *bold) + _vte_debug_print(VTE_DEBUG_MISC, + "Set bold color to (%04x,%04x,%04x).\n", + bold->red, bold->green, bold->blue); +- _vte_terminal_set_color_internal(terminal, VTE_BOLD_FG, bold); ++ _vte_terminal_set_color_internal(terminal, VTE_BOLD_FG, FALSE, bold); + } + + /** +@@ -2622,7 +2636,7 @@ vte_terminal_set_color_dim(VteTerminal *terminal, const GdkColor *dim) + _vte_debug_print(VTE_DEBUG_MISC, + "Set dim color to (%04x,%04x,%04x).\n", + dim->red, dim->green, dim->blue); +- _vte_terminal_set_color_internal(terminal, VTE_DIM_FG, dim); ++ _vte_terminal_set_color_internal(terminal, VTE_DIM_FG, FALSE, dim); + } + + /** +@@ -2642,7 +2656,7 @@ vte_terminal_set_color_foreground(VteTerminal *terminal, + _vte_debug_print(VTE_DEBUG_MISC, + "Set foreground color to (%04x,%04x,%04x).\n", + foreground->red, foreground->green, foreground->blue); +- _vte_terminal_set_color_internal(terminal, VTE_DEF_FG, foreground); ++ _vte_terminal_set_color_internal(terminal, VTE_DEF_FG, FALSE, foreground); + } + + /** +@@ -2664,7 +2678,24 @@ vte_terminal_set_color_background(VteTerminal *terminal, + _vte_debug_print(VTE_DEBUG_MISC, + "Set background color to (%04x,%04x,%04x).\n", + background->red, background->green, background->blue); +- _vte_terminal_set_color_internal(terminal, VTE_DEF_BG, background); ++ _vte_terminal_set_color_internal(terminal, VTE_DEF_BG, FALSE, background); ++} ++ ++void ++_vte_terminal_set_color_cursor_internal(VteTerminal *terminal, ++ gboolean via_escape, ++ const GdkColor *cursor_background) ++{ ++ if (!via_escape) { ++ _vte_terminal_set_color_internal(terminal, VTE_CUR_BG, FALSE, ++ cursor_background); ++ terminal->pvt->cursor_default_color_set = TRUE; ++ } ++ if (via_escape || !terminal->pvt->cursor_color_set) { ++ _vte_terminal_set_color_internal(terminal, VTE_CUR_BG, TRUE, ++ cursor_background); ++ terminal->pvt->cursor_color_set = TRUE; ++ } + } + + /** +@@ -2690,13 +2721,19 @@ vte_terminal_set_color_cursor(VteTerminal *terminal, + cursor_background->red, + cursor_background->green, + cursor_background->blue); +- _vte_terminal_set_color_internal(terminal, VTE_CUR_BG, +- cursor_background); +- terminal->pvt->cursor_color_set = TRUE; +- } else { +- _vte_debug_print(VTE_DEBUG_MISC, +- "Cleared cursor color.\n"); +- terminal->pvt->cursor_color_set = FALSE; ++ _vte_terminal_set_color_cursor_internal(terminal, FALSE, cursor_background); ++ } else if (terminal->pvt->cursor_default_color_set) { ++ /* Unset only if there isn't a different value set by escape sequences. ++ Note: there's no way to reset the cursor color's defaults via escapes. */ ++ PangoColor *default_color = &terminal->pvt->default_palette[VTE_CUR_BG]; ++ PangoColor *actual_color = &terminal->pvt->palette[VTE_CUR_BG]; ++ if (default_color->red == actual_color->red && ++ default_color->green == actual_color->green && ++ default_color->blue == actual_color->blue) { ++ _vte_debug_print(VTE_DEBUG_MISC, ++ "Cleared cursor color.\n"); ++ terminal->pvt->cursor_default_color_set = FALSE; ++ } + } + } + +@@ -2723,7 +2760,7 @@ vte_terminal_set_color_highlight(VteTerminal *terminal, + highlight_background->red, + highlight_background->green, + highlight_background->blue); +- _vte_terminal_set_color_internal(terminal, VTE_DEF_HL, ++ _vte_terminal_set_color_internal(terminal, VTE_DEF_HL, FALSE, + highlight_background); + terminal->pvt->highlight_color_set = TRUE; + } else { +@@ -2864,7 +2901,9 @@ vte_terminal_set_colors(VteTerminal *terminal, + } + + /* Set up the color entry. */ +- _vte_terminal_set_color_internal(terminal, i, &color); ++ _vte_terminal_set_color_internal(terminal, i, FALSE, &color); ++ if (!terminal->pvt->palette_initialized) ++ _vte_terminal_set_color_internal(terminal, i, TRUE, &color); + } + + /* Track that we had a color palette set. */ +@@ -9186,7 +9225,7 @@ vte_terminal_realize(GtkWidget *widget) + color.green = terminal->pvt->palette[i].green; + color.blue = terminal->pvt->palette[i].blue; + color.pixel = 0; +- _vte_terminal_set_color_internal(terminal, i, &color); ++ _vte_terminal_set_color_internal(terminal, i, FALSE, &color); + } + + /* Set up input method support. FIXME: do we need to handle the +diff --git a/src/vteseq.c b/src/vteseq.c +index dc82792..fad4d46 100644 +--- a/src/vteseq.c ++++ b/src/vteseq.c +@@ -1913,7 +1913,7 @@ vte_sequence_handler_change_color (VteTerminal *terminal, GValueArray *params) + continue; + + if (vte_parse_color (pairs[i + 1], &color)) { +- _vte_terminal_set_color_internal(terminal, idx, &color); ++ _vte_terminal_set_color_internal(terminal, idx, TRUE, &color); + } else if (strcmp (pairs[i + 1], "?") == 0) { + gchar buf[128]; + g_snprintf (buf, sizeof (buf), +@@ -3437,7 +3437,7 @@ vte_sequence_handler_change_cursor_color (VteTerminal *terminal, GValueArray *pa + return; + + if (vte_parse_color (name, &color)) +- vte_terminal_set_color_cursor (terminal, &color); ++ _vte_terminal_set_color_cursor_internal(terminal, TRUE, &color); + else if (strcmp (name, "?") == 0) { + gchar buf[128]; + g_snprintf (buf, sizeof (buf), diff --git a/vte3.spec b/vte3.spec index 8bfaebe..1db07ce 100644 --- a/vte3.spec +++ b/vte3.spec @@ -1,6 +1,6 @@ Name: vte3 Version: 0.34.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A terminal emulator License: LGPLv2+ Group: User Interface/X @@ -11,6 +11,8 @@ Patch0: honey-I-shrank-the-terminal.patch Patch1: vte-alt-meta-confusion.patch # https://bugzilla.gnome.org/show_bug.cgi?id=688456 Patch2: 0001-widget-Only-show-the-cursor-on-motion-if-moved.patch +# https://bugzilla.gnome.org/show_bug.cgi?id=705985 +Patch3: vte-color-escape.patch BuildRequires: gtk3-devel >= 3.0.0 BuildRequires: ncurses-devel @@ -43,6 +45,7 @@ vte. %patch0 -p1 -b .grow-up %patch1 -p1 -b .alt-meta %patch2 -p1 -b .motion +%patch3 -p1 -b .color-escape %build CFLAGS="%optflags -fPIE -DPIE" \ @@ -90,6 +93,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %changelog +* Fri May 9 2014 Matthias Clasen - 0.34.9-2 +- Apply an upstream fix for xterm escape sequences + * Tue Oct 15 2013 Richard Hughes - 0.34.9-1 - Update to 0.34.9 From f6ca788fa9bd0dcdcbac221f2772f6977f72aa86 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 15 May 2014 14:33:07 +0200 Subject: [PATCH 3/3] Backport transparency fixes --- fix-transparency.patch | 54 ++++++++++++++++++++++++++++++++++++++++++ vte3.spec | 7 +++++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 fix-transparency.patch diff --git a/fix-transparency.patch b/fix-transparency.patch new file mode 100644 index 0000000..ef31f38 --- /dev/null +++ b/fix-transparency.patch @@ -0,0 +1,54 @@ +From 56e102efc7d4ae62da859174619ea27452b2abb1 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Fri, 9 May 2014 19:43:55 +0200 +Subject: [PATCH 1/2] vteapp: Unbreak transparency + +Mark the window as app-paintable. Otherwise GTK+ will try to optimize +by setting an opaque region for the whole window (gtk+ 3c2c3ab6). + +https://bugzilla.gnome.org/show_bug.cgi?id=729884 +--- + src/vteapp.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/vteapp.c b/src/vteapp.c +index cb6af44..8c19b26 100644 +--- a/src/vteapp.c ++++ b/src/vteapp.c +@@ -901,6 +901,7 @@ main(int argc, char **argv) + background); + } + if (transparent) { ++ gtk_widget_set_app_paintable (window, TRUE); + vte_terminal_set_background_transparent(terminal, + TRUE); + vte_terminal_set_background_tint_color(terminal, &tint); +-- +1.9.0 + + +From c15e75c6863587dc77039f063ce740ab58c4bea1 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Mon, 12 May 2014 18:58:26 +0200 +Subject: [PATCH 2/2] widget: Update background when opacity is changed + +https://bugzilla.gnome.org/show_bug.cgi?id=730023 +--- + src/vte.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/vte.c b/src/vte.c +index 3227b07..811cc5c 100644 +--- a/src/vte.c ++++ b/src/vte.c +@@ -3101,6 +3101,7 @@ vte_terminal_set_opacity(VteTerminal *terminal, guint16 opacity) + return; + + pvt->bg_opacity = opacity; ++ vte_terminal_queue_background_update(terminal); + + g_object_notify(G_OBJECT(terminal), "background-opacity"); + } +-- +1.9.0 + diff --git a/vte3.spec b/vte3.spec index 1db07ce..3e8d633 100644 --- a/vte3.spec +++ b/vte3.spec @@ -1,6 +1,6 @@ Name: vte3 Version: 0.34.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A terminal emulator License: LGPLv2+ Group: User Interface/X @@ -13,6 +13,7 @@ Patch1: vte-alt-meta-confusion.patch Patch2: 0001-widget-Only-show-the-cursor-on-motion-if-moved.patch # https://bugzilla.gnome.org/show_bug.cgi?id=705985 Patch3: vte-color-escape.patch +Patch4: fix-transparency.patch BuildRequires: gtk3-devel >= 3.0.0 BuildRequires: ncurses-devel @@ -46,6 +47,7 @@ vte. %patch1 -p1 -b .alt-meta %patch2 -p1 -b .motion %patch3 -p1 -b .color-escape +%patch4 -p1 -b .transparency %build CFLAGS="%optflags -fPIE -DPIE" \ @@ -93,6 +95,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %changelog +* Thu May 15 2014 Debarshi Ray - 0.34.9-3 +- Backport transparency fixes + * Fri May 9 2014 Matthias Clasen - 0.34.9-2 - Apply an upstream fix for xterm escape sequences