@@ -1782,21 +1782,44 @@ LXTerminal * lxterminal_initialize(LXTermWindow * lxtermwin, CommandArguments *
1782
1782
/* Apply new settings to a terminal. */
1783
1783
static void terminal_settings_apply (LXTerminal * terminal )
1784
1784
{
1785
+ Setting * setting = get_setting ();
1786
+
1785
1787
/* Reinitialize "composited". */
1786
1788
terminal -> rgba = gdk_screen_is_composited (gtk_widget_get_screen (terminal -> window ));
1787
1789
1790
+ #if GTK_CHECK_VERSION (2 , 90 , 8 )
1791
+ /* Found in vteapp as a workaround. Related bug:
1792
+ * https://bugzilla.gnome.org/show_bug.cgi?format=multiple&id=729884 */
1793
+ gboolean has_transparency = setting -> background_color .alpha < 1.0 ;
1794
+ gtk_widget_set_app_paintable (
1795
+ 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
+ #endif
1810
+
1788
1811
/* Update tab position. */
1789
- terminal -> tab_position = terminal_tab_get_position_id (get_setting () -> tab_position );
1812
+ terminal -> tab_position = terminal_tab_get_position_id (setting -> tab_position );
1790
1813
terminal_tab_set_position (terminal -> notebook , terminal -> tab_position );
1791
1814
1792
1815
/* Update menu accelerators. */
1793
1816
terminal_menu_accelerator_update (terminal );
1794
1817
1795
1818
/* disable mnemonics if <ALT>n is diabled */
1796
- g_object_set (gtk_settings_get_default (), "gtk-enable-mnemonics" , !get_setting () -> disable_alt , NULL );
1819
+ g_object_set (gtk_settings_get_default (), "gtk-enable-mnemonics" , !setting -> disable_alt , NULL );
1797
1820
1798
1821
/* Hide or show menubar. */
1799
- if (get_setting () -> hide_menu_bar )
1822
+ if (setting -> hide_menu_bar )
1800
1823
{
1801
1824
gtk_widget_hide (terminal -> menu );
1802
1825
}
0 commit comments