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

[PATCH] gitk: restore wm state to normal before saving geometry information

From
Alexey Borzenkov <snaury@gmail.com>
Date
Sep 8, 2009, 19:22 UTC
Message-ID
<1252437756-81986-1-git-send-email-snaury@gmail.com>

gitk now includes patches for saving and restoring wm state, however because it saves wm geometry when window can still be maximized the maximize/restore button becomes useless after restarting gitk (you will get a huge displaced window if you try to restore it). This patch fixes this issue by storing window geometry in normal state.

Signed-off-by: Alexey Borzenkov <snaury@gmail.com>
---
 My previous email didn't come out rights, I hope this one will
 Don't forget to cc me if you have any comments/questions
 gitk |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/gitk b/gitk
index 8c08310..fedeb88 100755
--- a/gitk
+++ b/gitk
@@ -2555,8 +2555,11 @@ proc savestuff {w} {
 	puts $f [list set extdifftool $extdifftool]
 	puts $f [list set perfile_attrs $perfile_attrs]
 
-	puts $f "set geometry(main) [wm geometry .]"
 	puts $f "set geometry(state) [wm state .]"
+	if {[wm state .] eq {zoomed}} {
+		wm state . normal
+	}
+	puts $f "set geometry(main) [wm geometry .]"
 	puts $f "set geometry(topwidth) [winfo width .tf]"
 	puts $f "set geometry(topheight) [winfo height .tf]"
         puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sash coord 0]\""
-- 
1.6.4.2
Next: Pat Thoyts
Message 1 of 16 in “gitk: restore wm state to normal before saving geometry information”
  1. gitk: restore wm state to normal before saving geometry informationAlexey Borzenkov, Sep 8, 2009
  2. 1/2 Work around leftover temporary save file.Pat Thoyts, Sep 15, 2009
  3. Alex RiesenSep 15, 2009
  4. Alexey BorzenkovSep 15, 2009
  5. Pat ThoytsSep 15, 2009
  6. Pat ThoytsSep 15, 2009
  7. 2/2 Fix the geometry when restoring from zoomed state.Pat Thoyts, Sep 15, 2009
  8. Alexey BorzenkovSep 15, 2009
  9. Paul MackerrasSep 17, 2009
  10. Alexey BorzenkovSep 17, 2009
  11. Pat ThoytsSep 18, 2009
  12. Pat ThoytsSep 15, 2009
  13. Alexey BorzenkovSep 15, 2009
  14. Alexey BorzenkovSep 15, 2009
  15. Paul MackerrasSep 16, 2009
  16. Pat ThoytsSep 16, 2009

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.