From 0897c0e16f6efd0fd3e91000a63412b0d6957e81 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 27 Jan 2009 21:56:28 +0000 Subject: [PATCH] move the background transparency setting to a handler attached to the vte widget's realize signal --- terminatorlib/terminatorterm.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index 95e04c6c..0da41abd 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -657,10 +657,12 @@ text/plain if self._composited_support and not self._vte.is_composited(): dbg ('H9TRANS: Set background transparency to: %s' % (background_type == "transparent")) - self._vte.set_background_transparent (background_type == "transparent") + background_transparent = (background_type == "transparent") else: dbg ('H9TRANS: Set background transparency to: False, hard') - self._vte.set_background_transparent (False) + background_transparent = False + + self._vte.connect_after ("realize", self.set_background_transparent, background_transparent) # Set our cursor blinkiness self._vte.set_cursor_blinks (self.conf.cursor_blink) @@ -699,6 +701,10 @@ text/plain self._vte.queue_draw () + def set_background_transparent (self, widget, background_transparent): + dbg ("Setting VTE transparency to: %s" % background_transparent) + self._vte.set_background_transparent (background_transparent) + def on_composited_changed (self, widget): self.reconfigure_vte ()