git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Levedahl <mlevedahl@gmail.com>
To: Michael Rappazzo <rappazzo@gmail.com>, git@vger.kernel.org
Cc: j6t@kdbg.org, Johannes Sixt <johannes.sixt@telecom.at>
Subject: Re: [PATCH v3 1/2] Revert "gitk: Only restore window size from ~/.gitk, not position"
Date: Sun, 28 Sep 2025 10:17:06 -0400	[thread overview]
Message-ID: <be1e6cba-c94d-4c2f-ab68-e368ffe9daa5@gmail.com> (raw)
In-Reply-To: <20250928135435.59623-2-rappazzo@gmail.com>

On 9/28/25 9:54 AM, Michael Rappazzo wrote:
> From: Johannes Sixt <johannes.sixt@telecom.at>
>
> This reverts commit b9bee11526ec23541ddbbd75716bfd1acc241463.
>
> The commit catered to an unsupportable port of the Windows Tcl/Tk
> stuck at 8.4.1 that was used by Cygwin. 8.4.1 has some bad bugs in its
> layout engine, and forced changes in Gitk to be compatible. All this
> became irrelevant around 2011 after Cygwin gained an X11 server and
> switched to a supportable port of the Unix/X11 Tcl/Tk (it is now on the
> current 8.6 code base).
>
> Helped-by: Mark Levedahl <mlevedahl@gmail.com>
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> ---
>  gitk | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/gitk b/gitk
> index 6e4d71d585..275f353811 100755
> --- a/gitk
> +++ b/gitk
> @@ -2764,17 +2764,9 @@ proc makewindow {} {
>      .pwbottom add .bright
>      .ctop add .pwbottom
>  
> -    # restore window width & height if known
> +    # restore window position if known
>      if {[info exists geometry(main)]} {
> -        if {[scan $geometry(main) "%dx%d" w h] >= 2} {
> -            if {$w > [winfo screenwidth .]} {
> -                set w [winfo screenwidth .]
> -            }
> -            if {$h > [winfo screenheight .]} {
> -                set h [winfo screenheight .]
> -            }
> -            wm geometry . "${w}x$h"
> -        }
> +        wm geometry . "$geometry(main)"
>      }
>  
>      if {[info exists geometry(state)] && $geometry(state) eq "zoomed"} {
I mis-interpreted an earlier inquiry about the patch being reverted here. Patch e9937d2a03
actually addressed the issues of Cygwin's 8.4.1 Tcl/Tk. Part of that was fixing the window
geometry being restored, as sometimes the window manager would size the main window in a
manner causing 8.4.1 to fail. But, this override of the main window manager on all
platforms raised complaints on the mailing list, and commit b9bee11526 was the response:
it was only the SIZE of the Window that mattered on Cygwin, not its location, so allowing
window managers to set the location was ok.

Personally, I'm fine with gitk remembering / restoring the full window geometry (I wrote
it that way in e9937d2a03).

Mark

  reply	other threads:[~2025-09-28 14:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-28 13:54 [PATCH v3 0/2] gitk: make Tags and Heads window geometry sticky Michael Rappazzo
2025-09-28 13:54 ` [PATCH v3 1/2] Revert "gitk: Only restore window size from ~/.gitk, not position" Michael Rappazzo
2025-09-28 14:17   ` Mark Levedahl [this message]
2025-09-28 15:01     ` Mike Rappazzo
2025-10-17 16:36     ` Johannes Sixt
2025-10-17 19:27       ` Mark Levedahl
2025-09-28 15:49   ` Junio C Hamano
2025-09-28 13:54 ` [PATCH v3 2/2] gitk: make Tags and Heads window geometry sticky Michael Rappazzo
2025-09-28 15:57   ` Junio C Hamano
2025-10-04 17:36   ` Johannes Sixt
2025-10-04 22:04     ` [PATCH] gitk: persist position and size of the Tags and Heads window Johannes Sixt
2025-10-06 15:29       ` [PATCH v2] " 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=be1e6cba-c94d-4c2f-ab68-e368ffe9daa5@gmail.com \
    --to=mlevedahl@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=johannes.sixt@telecom.at \
    --cc=rappazzo@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).