fix issue with older vte lib

This commit is contained in:
Matt Rose 2020-11-18 09:46:25 -05:00
parent ebc266e554
commit 1be51cccad

View File

@ -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