Add patch from Thomas Meire to prevent closing terminals from removing focus from any terminal. Closes LP #179054
This commit is contained in:
parent
1e2891a129
commit
6d5cac4b09
13
terminator
13
terminator
|
@ -535,6 +535,7 @@ class Terminator:
|
||||||
return
|
return
|
||||||
|
|
||||||
if isinstance (parent, gtk.Paned):
|
if isinstance (parent, gtk.Paned):
|
||||||
|
index = self.term_list.index (widget)
|
||||||
grandparent = parent.get_parent ()
|
grandparent = parent.get_parent ()
|
||||||
|
|
||||||
# Discover sibling while all objects exist
|
# Discover sibling while all objects exist
|
||||||
|
@ -554,10 +555,14 @@ class Terminator:
|
||||||
widget.get_box ().destroy ()
|
widget.get_box ().destroy ()
|
||||||
parent.destroy ()
|
parent.destroy ()
|
||||||
|
|
||||||
for term in self.term_list:
|
if not isinstance (sibling, gtk.Paned):
|
||||||
if term.get_box () == sibling:
|
for term in self.term_list:
|
||||||
term._vte.grab_focus ()
|
if term.get_box () == sibling:
|
||||||
break
|
term._vte.grab_focus ()
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
if index == 0: index = 1
|
||||||
|
self.term_list[index - 1]._vte.grab_focus ()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue