@matheusbsbs / matheus-bagliano / commits / 0eafba1405
Fork 0

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 <paulus@samba.org>

Paul Mackerras committed Jul 23, 2007 at 21:35 UTC 0eafba1405bf4db29bca0b535477beb3046441bf
1 file changed +2
gitk
+2
@@ -7646,6 +7646,8 @@ set localfrow -1
7646 set lserial 0
7647 setcoords
7648 makewindow
7649 +# wait for the window to become visible
7650 +tkwait visibility .
7651 wm title . "[file tail $argv0]: [file tail [pwd]]"
7652 readrefs
7653