Skip to content

Commit fb2b727

Browse files
committed
Merge branch 'fix/fix-background-echoes'
2 parents 286d5ed + b6c3fcb commit fb2b727

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

src/lxterminal.c

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,22 @@ static Term * terminal_new(LXTerminal * terminal, const gchar * label, const gch
11941194
gtk_box_pack_start(GTK_BOX(term->box), term->scrollbar, FALSE, TRUE, 0);
11951195
gtk_widget_set_no_show_all(GTK_WIDGET(term->scrollbar), TRUE);
11961196

1197+
#if GTK_CHECK_VERSION (2, 90, 8)
1198+
/* De-transarent box after setting gtk_widget_set_app_paintable to the
1199+
* GtkWindow */
1200+
GtkCssProvider* box_css_provider = gtk_css_provider_new();
1201+
gtk_css_provider_load_from_data(box_css_provider,
1202+
"box{background-color:@theme_bg_color;}",
1203+
-1, NULL
1204+
);
1205+
1206+
GtkStyleContext* box_style_ctx =
1207+
gtk_widget_get_style_context(GTK_WIDGET(terminal->box));
1208+
gtk_style_context_add_provider(
1209+
box_style_ctx, box_css_provider,
1210+
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
1211+
#endif
1212+
11971213
/* Set up the VTE. */
11981214
setlocale(LC_ALL, "");
11991215
#if VTE_CHECK_VERSION (0, 38, 0)
@@ -1793,19 +1809,6 @@ static void terminal_settings_apply(LXTerminal * terminal)
17931809
gboolean has_transparency = setting->background_color.alpha < 1.0;
17941810
gtk_widget_set_app_paintable(
17951811
GTK_WIDGET(terminal->window), has_transparency);
1796-
1797-
/* De-transarent box */
1798-
GtkCssProvider* box_css_provider = gtk_css_provider_new();
1799-
gtk_css_provider_load_from_data(box_css_provider,
1800-
"box{background-color:@theme_bg_color;}",
1801-
-1, NULL
1802-
);
1803-
1804-
GtkStyleContext* box_style_ctx =
1805-
gtk_widget_get_style_context(GTK_WIDGET(terminal->box));
1806-
gtk_style_context_add_provider(
1807-
box_style_ctx, box_css_provider,
1808-
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
18091812
#endif
18101813

18111814
/* Update tab position. */

0 commit comments

Comments
 (0)