Skip to contentSkip to conversation

gitk: persist and restore the window state with the geometry

PATCH In review Pat Thoyts 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

Pat Thoyts

author
#0 lore raw

PATCH 1/1 gitk: persist and restore the window state with the geometry

This patch records the window state and if the window was maximized this state is re-applied.

---
 gitk |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
gitk +5 -0
index a7294a1..edb3ba2 100755
@@ -2251,6 +2251,10 @@ proc makewindow {} {
 	}
     }
 
+    if {[info exists geometry(state)] && $geometry(state) eq "zoomed"} {
+        wm state . $geometry(state)
+    }
+
     if {[tk windowingsystem] eq {aqua}} {
         set M1B M1
         set ::BM "3"
@@ -2540,6 +2544,7 @@ proc savestuff {w} {
 	puts $f [list set perfile_attrs $perfile_attrs]
 
 	puts $f "set geometry(main) [wm geometry .]"
+	puts $f "set geometry(state) [wm state .]"
 	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]\""
Signature · 1 line
1.6.2.2.1669.g7eaf8