From: "Tobias Pietzsch via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Paul Mackerras <paulus@ozlabs.org>,
Tobias Pietzsch <tobias.pietzsch@gmail.com>,
Tobias Pietzsch <pietzsch@mycroft.speedport.ip>
Subject: [PATCH] gitk: check main window visibility before waiting for it to show
Date: Sat, 09 Jan 2021 23:26:11 +0000 [thread overview]
Message-ID: <pull.944.git.git.1610234771966.gitgitgadget@gmail.com> (raw)
From: Tobias Pietzsch <pietzsch@mycroft.speedport.ip>
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>
---
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
The symptom of the for-ever waiting is that gitk shows just an empty
window, like this: https://tinyurl.com/yxr5qlf6 It happens (to me) on
macOS 11.1 with git-gui installed via homebrew. It doesn't happen on
macOS 10.14.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-944%2Ftpietzsch%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-944/tpietzsch/master-v1
Pull-Request: https://github.com/git/git/pull/944
gitk-git/gitk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 23d9dd1fe0d..cd02b4d50fc 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -12658,7 +12658,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
base-commit: 72c4083ddf91b489b7b7b812df67ee8842177d98
--
gitgitgadget
next reply other threads:[~2021-01-09 23:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-09 23:26 Tobias Pietzsch via GitGitGadget [this message]
2021-01-10 22:23 ` [PATCH] gitk: check main window visibility before waiting for it to show Beat Bolli
[not found] ` <ddee92a7-3d1e-f869-9cc4-72b70eee0dd5@gmx.de>
2024-11-13 7:47 ` The health of gitk, was " Johannes Schindelin
2024-11-14 7:19 ` Paul Mackerras
2024-11-14 8:07 ` Junio C Hamano
2024-11-17 15:26 ` Gitk maintainership, was Re: The health of gitk Johannes Sixt
2024-11-19 9:59 ` Paul Mackerras
2024-11-19 18:49 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pull.944.git.git.1610234771966.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=paulus@ozlabs.org \
--cc=pietzsch@mycroft.speedport.ip \
--cc=tobias.pietzsch@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).