]> Kevux Git Server - rit/commitdiff
gitk: check main window visibility before waiting for it to show
authorTobias Pietzsch <pietzsch@mycroft.speedport.ip>
Sat, 9 Jan 2021 22:14:08 +0000 (23:14 +0100)
committerJohannes Sixt <j6t@kdbg.org>
Sun, 24 Nov 2024 14:31:45 +0000 (15:31 +0100)
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 <pietzsch@mycroft.speedport.ip>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
gitk

diff --git a/gitk b/gitk
index 7a087f1..de27855 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -12687,7 +12687,7 @@ catch {
     wm iconphoto . -default gitlogo gitlogo32
 }
 # wait for the window to become visible
-tkwait visibility .
+if {![winfo viewable .]} {tkwait visibility .}
 set_window_title
 update
 readrefs