[PATCH v3 1/2] Revert "gitk: Only restore window size from ~/.gitk, not position"
- From
Michael Rappazzo <rappazzo@gmail.com>
- Date
- Sep 28, 2025, 13:54 UTC
- Message-ID
- <20250928135435.59623-2-rappazzo@gmail.com>
- In-Reply-To
- <20250928135435.59623-1-rappazzo@gmail.com>
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"} {
-- 2.51.0