Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6ca788fa9 | ||
|
|
10e0e04595 | ||
|
|
889d5555b6 |
5 changed files with 275 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
54
fix-transparency.patch
Normal file
54
fix-transparency.patch
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
From 56e102efc7d4ae62da859174619ea27452b2abb1 Mon Sep 17 00:00:00 2001
|
||||
From: Debarshi Ray <debarshir@gnome.org>
|
||||
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 <debarshir@gnome.org>
|
||||
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
|
||||
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
b16a21d09322a41f6c82a0bdd8241467 vte-0.34.8.tar.xz
|
||||
cb2f3cd4889581dcb61ab6db40bee542 vte-0.34.9.tar.xz
|
||||
|
|
|
|||
203
vte-color-escape.patch
Normal file
203
vte-color-escape.patch
Normal file
|
|
@ -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),
|
||||
18
vte3.spec
18
vte3.spec
|
|
@ -1,6 +1,6 @@
|
|||
Name: vte3
|
||||
Version: 0.34.8
|
||||
Release: 1%{?dist}
|
||||
Version: 0.34.9
|
||||
Release: 3%{?dist}
|
||||
Summary: A terminal emulator
|
||||
License: LGPLv2+
|
||||
Group: User Interface/X
|
||||
|
|
@ -11,6 +11,9 @@ 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
|
||||
Patch4: fix-transparency.patch
|
||||
|
||||
BuildRequires: gtk3-devel >= 3.0.0
|
||||
BuildRequires: ncurses-devel
|
||||
|
|
@ -43,6 +46,8 @@ vte.
|
|||
%patch0 -p1 -b .grow-up
|
||||
%patch1 -p1 -b .alt-meta
|
||||
%patch2 -p1 -b .motion
|
||||
%patch3 -p1 -b .color-escape
|
||||
%patch4 -p1 -b .transparency
|
||||
|
||||
%build
|
||||
CFLAGS="%optflags -fPIE -DPIE" \
|
||||
|
|
@ -90,6 +95,15 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu May 15 2014 Debarshi Ray <rishi@fedoraproject.org> - 0.34.9-3
|
||||
- Backport transparency fixes
|
||||
|
||||
* Fri May 9 2014 Matthias Clasen <mclasen@redhat.com> - 0.34.9-2
|
||||
- Apply an upstream fix for xterm escape sequences
|
||||
|
||||
* Tue Oct 15 2013 Richard Hughes <rhughes@redhat.com> - 0.34.9-1
|
||||
- Update to 0.34.9
|
||||
|
||||
* Wed Sep 18 2013 Kalev Lember <kalevlember@gmail.com> - 0.34.8-1
|
||||
- Update to 0.34.8
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue