[Xfce4-commits] [apps/xfce4-terminal] 01/01: Make transparent background setting work (at least for GTK 3.20)

noreply at xfce.org noreply at xfce.org
Fri Jul 1 20:22:02 CEST 2016


This is an automated email from the git hooks/post-receive script.

f2404 pushed a commit to branch master
in repository apps/xfce4-terminal.

commit e7240a89b716f9df61ab8c819f8c1bfa29974be1
Author: Igor <f2404 at yandex.ru>
Date:   Fri Jul 1 21:21:22 2016 +0300

    Make transparent background setting work (at least for GTK 3.20)
---
 terminal/terminal-screen.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 50b3785..d906572 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -1388,6 +1388,7 @@ terminal_screen_timer_background (gpointer user_data)
   TerminalImageLoader *loader;
   TerminalBackground   background_mode;
   GdkPixbuf           *image;
+  GtkWidget           *toplevel;
   gdouble              background_darkness;
 
   terminal_return_val_if_fail (TERMINAL_IS_SCREEN (screen), FALSE);
@@ -1434,12 +1435,16 @@ terminal_screen_timer_background (gpointer user_data)
     {
       g_object_get (G_OBJECT (screen->preferences), "background-darkness", &background_darkness, NULL);
     }
+  else
+    background_darkness = 0.0;
 
   //vte_terminal_set_background_saturation (VTE_TERMINAL (screen->terminal), saturation);
   //vte_terminal_set_opacity (VTE_TERMINAL (screen->terminal), opacity);
   //vte_terminal_set_background_transparent (VTE_TERMINAL (screen->terminal),
   //                                         background_mode == TERMINAL_BACKGROUND_TRANSPARENT
   //                                         && !gtk_widget_is_composited (GTK_WIDGET (screen)));
+  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (screen));
+  gtk_widget_set_opacity (toplevel, 1.0 - background_darkness);
 
   GDK_THREADS_LEAVE ();
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list