# Re: \[PATCH\] gitk: check main window visibility before waiting for it to show

- From: Beat Bolli \<hidden\>
- Date: 2021-01-10 22:24:19 
- List: git
- Page: https://ratatoskr.run/git/2021/01/7871979
- Thread: https://ratatoskr.run/git/2021/01/7871554/t.md

```text
On 10.01.21 00:26, Tobias Pietzsch via GitGitGadget wrote:
> From: Tobias Pietzsch <redacted>
>
> 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 <redacted>
> ---
>     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.

Thanks, this also occurred on my macOS 10.14.6 just an hour ago after a
recent brew upgrade, and the patch makes gitk usable again.

Cheers, Beat
```
