git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Michael Rappazzo <rappazzo@gmail.com>
Date
Sep 20, 2025, 18:40 UTC
Message-ID
<20250920184007.26183-2-rappazzo@gmail.com>
In-Reply-To
<20250920184007.26183-1-rappazzo@gmail.com>

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"} {
-- 
2.51.0
Previous: Michael RappazzoNext: Johannes Sixt
Message 2 of 8 in “gitk: make the 'Tags and Heads' window geometry sticky”
  1. 0/2 gitk: make the 'Tags and Heads' window geometry stickyMichael Rappazzo, Sep 20, 2025
  2. 1/2 gitk: fix the position of the main main window on initializeMichael Rappazzo, Sep 20, 2025
  3. Johannes SixtSep 22, 2025
  4. Mark LevedahlSep 22, 2025
  5. 2/2 gitk: make Tags and Heads window geometry stickyMichael Rappazzo, Sep 20, 2025
  6. Johannes SixtSep 22, 2025
  7. Mike RappazzoSep 25, 2025
  8. Mike RappazzoSep 28, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.