when we remove a terminal we should remove the vte widget and remove the reference to it from the TerminatorTerm object. It's likely we are still leaking other gtk objects, but that is considerably less important than leaking vte.Terminal objects and thus child processes
This commit is contained in:
parent
5c09dc4b6b
commit
04aae49867
|
@ -771,12 +771,17 @@ class Terminator:
|
||||||
if isinstance(sibling, TerminatorTerm) and isinstance(sibling.get_parent(), gtk.Notebook):
|
if isinstance(sibling, TerminatorTerm) and isinstance(sibling.get_parent(), gtk.Notebook):
|
||||||
sibling._titlebox.hide()
|
sibling._titlebox.hide()
|
||||||
|
|
||||||
|
widget._vte.get_parent().remove(widget._vte)
|
||||||
|
widget._vte = None
|
||||||
self.term_list.remove (widget)
|
self.term_list.remove (widget)
|
||||||
|
|
||||||
elif isinstance (parent, gtk.Notebook):
|
elif isinstance (parent, gtk.Notebook):
|
||||||
parent.remove(widget)
|
parent.remove(widget)
|
||||||
nbpages = parent.get_n_pages()
|
nbpages = parent.get_n_pages()
|
||||||
index = self.term_list.index (widget)
|
index = self.term_list.index (widget)
|
||||||
|
|
||||||
|
widget._vte.get_parent().remove(widget._vte)
|
||||||
|
widget._vte = None
|
||||||
self.term_list.remove (widget)
|
self.term_list.remove (widget)
|
||||||
if nbpages == 1:
|
if nbpages == 1:
|
||||||
if self.window.allocation.height != gtk.gdk.screen_height():
|
if self.window.allocation.height != gtk.gdk.screen_height():
|
||||||
|
|
Loading…
Reference in New Issue