Re: [PATCH v2 1/2] gitk: fix the position of the main main window on initialize
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Sep 22, 2025, 06:00 UTC
- Message-ID
- <199b7665-910a-4f44-a734-ced99bc8cb81@kdbg.org>
- In-Reply-To
- <20250920184007.26183-2-rappazzo@gmail.com>
Am 20.09.25 um 20:40 schrieb Michael Rappazzo:
Show 21 quoted lines
> The main window geometry was only restoring size but not position.
> Use after idle to ensure proper timing on OS's where that is necessary.
>
> Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
> ---
> gitk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gitk b/gitk
> index 6e4d71d585..95469a8fae 100755
> --- a/gitk
> +++ b/gitk
> @@ -2775,6 +2775,8 @@ proc makewindow {} {
> }
> wm geometry . "${w}x$h"
> }
> + # Restore full geometry including position after window is mapped
> + after idle [list wm geometry . $geometry(main)]
> }
>
> if {[info exists geometry(state)] && $geometry(state) eq "zoomed"} {I have been carrying 22d37f865268 ("Revert "gitk: Only restore window size from ~/.gitk, not position"", 2008-05-26) since, like, 17 years in my branch j6t-testing. Perhaps Mark can tell us why b9bee11526ec ("gitk: Only restore window size from ~/.gitk, not position", 2008-03-10) was needed...
-- Hannes