From c190287d6c9695131873e6598592b8780673e430 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 27 Jan 2009 17:09:33 +0000 Subject: [PATCH] Exploratory patch which may fix some weird bugs, or may get reverted soon --- terminatorlib/terminator.py | 9 +++++++++ terminatorlib/terminatorterm.py | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 99316097..4505318c 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -750,6 +750,10 @@ class Terminator: dbg ("splitaxis function called, but Terminator was in zoomed mode.") return + # Make sure we are actually ready to do this + while gtk.events_pending (): + gtk.main_iteration () + # create a new terminal and parent pane. dbg ('SEGBUG: Creating TerminatorTerm') terminal = TerminatorTerm (self, self.profile, command, widget.get_cwd()) @@ -762,6 +766,11 @@ class Terminator: dbg ('SEGBUG: showed TerminatorTerm') terminal.spawn_child () dbg ('SEGBUG: spawned child') + + # Make sure we are actually ready to return + while gtk.events_pending (): + gtk.main_iteration () + return def remove(self, widget, keep = False): diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index 95e04c6c..e90821fb 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -123,7 +123,6 @@ class TerminatorTerm (gtk.VBox): self._composited_support = False #self._vte.set_double_buffered(True) self._vte.set_size (80, 24) - self.reconfigure_vte () self._vte._expose_data = None self._vte.show () @@ -243,6 +242,9 @@ class TerminatorTerm (gtk.VBox): dbg ('SEGBUG: Setting COLORTERM') os.putenv ('COLORTERM', 'gnome-terminal') dbg ('SEGBUG: TerminatorTerm __init__ complete') + while gtk.events_pending (): + gtk.main_iteration () + self.reconfigure_vte () def openurl (self, url): dbg ('openurl: viewing %s'%url)