diff --git a/terminatorlib/paned.py b/terminatorlib/paned.py index 5ee13862..abde04cb 100755 --- a/terminatorlib/paned.py +++ b/terminatorlib/paned.py @@ -43,6 +43,8 @@ class Paned(Container): container = VPaned() else: container = HPaned() + + self.get_toplevel().set_pos_by_ratio = True if not sibling: sibling = self.maker.make('terminal') @@ -60,6 +62,11 @@ class Paned(Container): container.add(terminal) self.show_all() + + while gtk.events_pending(): + gtk.main_iteration_do(False) + self.get_toplevel().set_pos_by_ratio = False + def add(self, widget, metadata=None): """Add a widget to the container""" diff --git a/terminatorlib/window.py b/terminatorlib/window.py index 2d7ed1b2..e770a0fa 100755 --- a/terminatorlib/window.py +++ b/terminatorlib/window.py @@ -419,6 +419,8 @@ class Window(Container, gtk.Window): container = maker.make('VPaned') else: container = maker.make('HPaned') + + self.set_pos_by_ratio = True if not sibling: sibling = maker.make('Terminal') @@ -434,6 +436,11 @@ class Window(Container, gtk.Window): for term in order: container.add(term) container.show_all() + + while gtk.events_pending(): + gtk.main_iteration_do(False) + self.set_pos_by_ratio = False + def zoom(self, widget, font_scale=True): """Zoom a terminal widget"""