From 4760f28fb1719a6d8bcbd0b5d1e8310d25a37565 Mon Sep 17 00:00:00 2001 From: Tobias Pietzsch Date: Sat, 9 Jan 2021 23:14:08 +0100 Subject: [PATCH] gitk: check main window visibility before waiting for it to show If the main window is already visible when gitk waits for it to become visible, gitk hangs forever. This commit adds a check whether the window is already visible. See https://wiki.tcl-lang.org/page/tkwait+visibility Signed-off-by: Tobias Pietzsch --- gitk-git/gitk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitk-git/gitk b/gitk-git/gitk index 26294152dbf540..18df002f90cc7c 100755 --- a/gitk-git/gitk +++ b/gitk-git/gitk @@ -12832,7 +12832,7 @@ if {$::tcl_platform(platform) eq {windows} && [file exists $gitk_prefix/etc/git. } } # wait for the window to become visible -tkwait visibility . +if {![winfo viewable .]} {tkwait visibility .} set_window_title update readrefs