From 1be51cccadf905b4bf5ba99984200e230df5472b Mon Sep 17 00:00:00 2001 From: Matt Rose Date: Wed, 18 Nov 2020 09:46:25 -0500 Subject: [PATCH] fix issue with older vte lib --- terminatorlib/terminal.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 44b5b097..44d95b5c 100644 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -42,7 +42,13 @@ class Overpaint(Vte.Terminal): self.overpaint = b def do_draw(self,cr): - bgc = Vte.Terminal.get_color_background_for_draw(self) + ### get_color_background_for_draw is not available in older + ### versions of vte + try: + bgc = Vte.Terminal.get_color_background_for_draw(self) + except AttributeError as e: + bgc = Gdk.RGBA() + bgc.parse(self.config['background_color']) Vte.Terminal.do_draw(self,cr) if self.overpaint: bgc.alpha = self.dim_l