@@ -1194,6 +1194,22 @@ static Term * terminal_new(LXTerminal * terminal, const gchar * label, const gch
1194
1194
gtk_box_pack_start (GTK_BOX (term -> box ), term -> scrollbar , FALSE, TRUE, 0 );
1195
1195
gtk_widget_set_no_show_all (GTK_WIDGET (term -> scrollbar ), TRUE);
1196
1196
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
+
1197
1213
/* Set up the VTE. */
1198
1214
setlocale (LC_ALL , "" );
1199
1215
#if VTE_CHECK_VERSION (0 , 38 , 0 )
@@ -1793,19 +1809,6 @@ static void terminal_settings_apply(LXTerminal * terminal)
1793
1809
gboolean has_transparency = setting -> background_color .alpha < 1.0 ;
1794
1810
gtk_widget_set_app_paintable (
1795
1811
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 );
1809
1812
#endif
1810
1813
1811
1814
/* Update tab position. */
0 commit comments