Subject: [PATCH v2 1/2] gitk: fix the position of the main main window on initialize

From: Michael Rappazzo <[email-masked]>
Date: Sat, 20 Sep 2025 14:40:06 -0400

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 <[email-masked]>
---
 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"} {
-- 
2.51.0