Fix rotate terminals under tabs, and (gtk3-only) focus loss on rotate
This commit is contained in:
parent
df0d9aa0eb
commit
8c45d97304
|
@ -535,9 +535,15 @@ class Window(Container, Gtk.Window):
|
||||||
maker = Factory()
|
maker = Factory()
|
||||||
# collect all paned children in breadth-first order
|
# collect all paned children in breadth-first order
|
||||||
paned = []
|
paned = []
|
||||||
for child in self.get_children():
|
child = self.get_child()
|
||||||
if maker.isinstance(child, 'Paned'):
|
|
||||||
paned.append(child)
|
# If our child is a Notebook, reset to work from its visible child
|
||||||
|
if maker.isinstance(child, 'Notebook'):
|
||||||
|
pagenum = child.get_current_page()
|
||||||
|
child = child.get_nth_page(pagenum)
|
||||||
|
|
||||||
|
if maker.isinstance(child, 'Paned'):
|
||||||
|
paned.append(child)
|
||||||
for p in paned:
|
for p in paned:
|
||||||
for child in p.get_children():
|
for child in p.get_children():
|
||||||
if child not in paned and maker.isinstance(child, 'Paned'):
|
if child not in paned and maker.isinstance(child, 'Paned'):
|
||||||
|
@ -546,10 +552,10 @@ class Window(Container, Gtk.Window):
|
||||||
for p in paned:
|
for p in paned:
|
||||||
p.rotate(widget, clockwise)
|
p.rotate(widget, clockwise)
|
||||||
self.show_all()
|
self.show_all()
|
||||||
widget.grab_focus()
|
|
||||||
|
|
||||||
while Gtk.events_pending():
|
while Gtk.events_pending():
|
||||||
Gtk.main_iteration_do(False)
|
Gtk.main_iteration_do(False)
|
||||||
|
widget.grab_focus()
|
||||||
self.set_pos_by_ratio = False
|
self.set_pos_by_ratio = False
|
||||||
|
|
||||||
def get_visible_terminals(self):
|
def get_visible_terminals(self):
|
||||||
|
|
Loading…
Reference in New Issue