From be6229cb9b74decc4480587842803178c302482f Mon Sep 17 00:00:00 2001 From: Emmanuel Bretelle Date: Sun, 6 Jul 2008 14:01:44 +0100 Subject: [PATCH] LP#242852 comment 19 seems to say that real_transparency is causing the issue. Re-pushing the code removed in rev 398 * added an new conf parameter (enable_real_transparency defaulting to True) so real_transparency can be disabled * This should be enough to push the release :) --- doc/terminator_config.5 | 4 ++++ terminatorlib/config.py | 1 + terminatorlib/terminator.py | 11 +++++++++++ 3 files changed, 16 insertions(+) diff --git a/doc/terminator_config.5 b/doc/terminator_config.5 index 15188a5c..518be0ea 100644 --- a/doc/terminator_config.5 +++ b/doc/terminator_config.5 @@ -15,6 +15,10 @@ The options can be defined one per line in the form: \fBOPTION = VALUE\fR. If true, allow applications in the terminal to make text boldface. Default value: \fBTrue\fR .TP +.B enable_real_transparency\fR (boolean) +If true, terminator will try to usereal transparency if possible. +Default value: \fBTrue\fR +.TP .B silent_bell\fR (boolean) If true, don't make a noise when applications send the escape sequence for the terminal bell. Flash the terminal instead. Default value: \fBTrue\fR diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 8606a01f..0bf3e918 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -128,6 +128,7 @@ class TerminatorConfValuestore: 'cycle_term_tab' : True, 'copy_on_selection' : False, 'close_button_on_tab' : True, + 'enable_real_transparency' : True, } def __getattr__ (self, keyname): diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 6e1834f5..81e7303f 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -160,6 +160,17 @@ class Terminator: if borderless or self.conf.borderless: self.window.set_decorated (False) + # Set RGBA colormap if possible so VTE can use real alpha + # channels for transparency. + #TODO maybe it work in every case + # LP#242852 real transparency causes graphical glitches, + # real transparency can be disabled in ~/.config/terminator/config + if self.conf.enable_real_transparency: + screen = self.window.get_screen() + colormap = screen.get_rgba_colormap() + if colormap: + self.window.set_colormap(colormap) + # Start out with just one terminal # FIXME: This should be really be decided from some kind of profile term = (TerminatorTerm (self, self.profile, self.command))