From 906301f977114a1aaa88a6328e6e35f28ad3aa62 Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Sun, 2 Jun 2013 00:44:45 -0400 Subject: [PATCH] set window background colour too Setting the window background window won't remove the flickering, but it should prevent it from being so glaring. If it works, this fixes #87. --- termite.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/termite.cc b/termite.cc index 5373841..4e4181c 100644 --- a/termite.cc +++ b/termite.cc @@ -1023,7 +1023,7 @@ get_config_cairo_color(GKeyFile *config, const char *group, const char *key) { return {}; } -static void load_theme(VteTerminal *vte, GKeyFile *config, hint_info &hints) { +static void load_theme(GtkWindow *window, VteTerminal *vte, GKeyFile *config, hint_info &hints) { std::array palette; char color_key[] = "color000"; @@ -1068,6 +1068,7 @@ static void load_theme(VteTerminal *vte, GKeyFile *config, hint_info &hints) { if (auto color = get_config_color(config, "colors", "background")) { vte_terminal_set_color_background(vte, &*color); vte_terminal_set_background_tint_color(vte, &*color); + gtk_widget_modify_bg((GtkWidget *)window, GTK_STATE_NORMAL, &*color); } if (auto color = get_config_color(config, "colors", "cursor")) { vte_terminal_set_color_cursor(vte, &*color); @@ -1232,7 +1233,7 @@ static void set_config(GtkWindow *window, VteTerminal *vte, config_info *info, } } - load_theme(vte, config, info->hints); + load_theme(window, vte, config, info->hints); }/*}}}*/ static void exit_with_status(VteTerminal *vte) {