diff --git a/doc/terminator_config.5 b/doc/terminator_config.5 index 1275d0a7..2bef47ca 100644 --- a/doc/terminator_config.5 +++ b/doc/terminator_config.5 @@ -36,10 +36,6 @@ These are the options Terminator currently supports in the global_config section Control how focus is given to terminals. 'click' means the focus only moves to a terminal after you click in it. 'sloppy' means the focus will follow the mouse pointer. 'system' means the focus will match that used by a GNOME window manager. Default value: \fBclick\fR .TP -.B enable_real_transparency\fR (boolean) -If true, Terminator will try to use real transparency if possible. -Default value: \fBFalse\fR -.TP .B handle_size Controls the width of the separator between terminals. Anything outside the range 0-5 (inclusive) will be ignored and use your default theme value. Default value: \fB-1\fR diff --git a/terminatorlib/config.py b/terminatorlib/config.py index f29b6340..41132a60 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -77,7 +77,6 @@ except ImportError: DEFAULTS = { 'global_config': { 'focus' : 'click', - 'enable_real_transparency' : True, 'handle_size' : -1, 'geometry_hinting' : True, 'window_state' : 'normal', diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 658042f7..8f23df66 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -613,10 +613,23 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) dbg('setting opacity: %d' % opacity) self.vte.set_opacity(opacity) - if self.config['background_type'] == 'transparent' and \ - self.config['enable_real_transparency'] == False: - dbg('setting background_transparent=True') - self.vte.set_background_transparent(True) + # This is quite hairy, but the basic explanation is that we should + # set_background_transparent(True) when we have no compositing and want + # fake background transparency, otherwise it should be False. + if not self.composite_support: + # We have no compositing support, fake background only + background_transparent = True + else: + if self.vte.is_composited() == False: + # We have compositing and it's enabled. no fake background. + background_transparent = True + else: + # We have compositing, but it's not enabled. fake background + background_transparent = False + + if self.config['background_type'] == 'transparent': + dbg('setting background_transparent=%s' % background_transparent) + self.vte.set_background_transparent(background_transparent) else: dbg('setting background_transparent=False') self.vte.set_background_transparent(False)