From: Paul Mackerras Date: Mon, 23 Jul 2007 11:35:03 +0000 (+1000) Subject: gitk: Wait for the window to become visible after creating it X-Git-Tag: v1.5.3-rc4~54^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0eafba1405bf4db29bca0b535477beb3046441bf;p=git.git gitk: Wait for the window to become visible after creating it When the git log process returned an error immediately, we were sometimes getting no main window and no error window displayed, with the gitk process just hanging waiting for something. It appears that the tkwait in show_error, which waits for the error window to be destroyed, wasn't sufficient to allow the main window or the error window to be mapped. This adds a wait in the main startup code after the main window has been created to wait until it is visible. This seems to fix the problem. Signed-off-by: Paul Mackerras --- diff --git a/gitk b/gitk index 66e4a643d..5cfb1cc39 100755 --- a/gitk +++ b/gitk @@ -7646,6 +7646,8 @@ set localfrow -1 set lserial 0 setcoords makewindow +# wait for the window to become visible +tkwait visibility . wm title . "[file tail $argv0]: [file tail [pwd]]" readrefs