Subject: Re: [PATCH v3 2/2] gitk: make Tags and Heads window geometry sticky

From: Junio C Hamano <[email-masked]>
Date: Sun, 28 Sep 2025 08:57:43 -0700

Michael Rappazzo <[email-masked]> writes:

> Currently, the Tags and Heads window always opens at a default position
> and size, requiring users to reposition it each time. This patch makes
> the window remember its geometry between sessions.

As the second patch in two-patch series, whose first step is a
revert we just saw, it is unclear what state of the code "Currently"
above refers to.  Has it been that way even before the revert (in
other words, even with the ancient Tcl/Tk 8.4.1 workaround), or have
we briefly regressed with the previous step to fix it correctly and
this is the right fix suitable for Tcl/Tk of the modern times?

> This change saves and restores the Tags and Heads window size and position
> relative to the main gitk window. The geometry is stored in the config file
> as `geometry(showrefs)` and persists between gitk sessions. The window
> position is stored relative to the main window, so it maintains the same
> spatial relationship when the main window is moved or when gitk is restarted
> on different monitors.
>
> Signed-off-by: Michael Rappazzo <[email-masked]>
> ---
>  gitk | 39 +++++++++++++++++++++++++++++++++++++--
>  1 file changed, 37 insertions(+), 2 deletions(-)

Nice.  Very well written explanation that tells why this is a good
thing to do to those who do not even use gitk very often.

As a pair of patches to an area with an official submaintainer, I
won't touch them and instead expect them to be fed via a pull
request once the reviews are done on them, but it still is
appreciated to see patches sent here for reviews even when the
submaintainer is part of the team that authored them.

Thanks.