git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org, paulus@samba.org
Cc: pietzsch@mycroft.speedport.ip, sunshine@sunshineco.com,
	tair.sabirgaliev@bee.kz, lists@haller-berlin.de,
	"Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Subject: [PATCH 3/3] gitk: check main window visibility before waiting for it to show
Date: Tue,  3 Aug 2021 18:09:00 -0700	[thread overview]
Message-ID: <20210804010900.33133-4-carenas@gmail.com> (raw)
In-Reply-To: <20210804010900.33133-1-carenas@gmail.com>

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>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 gitk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gitk b/gitk
index b62c12f..cc587b5 100755
--- a/gitk
+++ b/gitk
@@ -12664,7 +12664,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
-- 
2.33.0.rc0.433.g9a510e7e11


  parent reply	other threads:[~2021-08-04  1:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  1:08 [PATCH 0/3] gitk: macOS improvements Carlo Marcelo Arenas Belón
2021-08-04  1:08 ` [PATCH 1/3] gitk: skip calling osascript to set frontmost for tk >= 8.6 Carlo Marcelo Arenas Belón
2021-08-04  1:08 ` [PATCH 2/3] gitk: avoid fatal error if `exec osascript` fails Carlo Marcelo Arenas Belón
2021-08-04  1:09 ` Carlo Marcelo Arenas Belón [this message]
2021-08-04  6:27   ` [PATCH 3/3] gitk: check main window visibility before waiting for it to show Chris Torek
2021-08-04  2:37 ` [PATCH 0/3] gitk: macOS improvements Carlo Arenas

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=20210804010900.33133-4-carenas@gmail.com \
    --to=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=lists@haller-berlin.de \
    --cc=paulus@samba.org \
    --cc=pietzsch@mycroft.speedport.ip \
    --cc=sunshine@sunshineco.com \
    --cc=tair.sabirgaliev@bee.kz \
    /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).