Skip to content

Commit c876dba

Browse files
patthoytspaulusmack
authored andcommitted
gitk: Remember and restore the window state with the geometry
This records the window state in ~/.gitk. On startup, if the gitk window was previously maximized (zoomed), then we restore that state. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
1 parent b6e192d commit c876dba

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

gitk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,6 +2251,10 @@ proc makewindow {} {
22512251
}
22522252
}
22532253

2254+
if {[info exists geometry(state)] && $geometry(state) eq "zoomed"} {
2255+
wm state . $geometry(state)
2256+
}
2257+
22542258
if {[tk windowingsystem] eq {aqua}} {
22552259
set M1B M1
22562260
set ::BM "3"
@@ -2548,6 +2552,7 @@ proc savestuff {w} {
25482552
puts $f [list set perfile_attrs $perfile_attrs]
25492553

25502554
puts $f "set geometry(main) [wm geometry .]"
2555+
puts $f "set geometry(state) [wm state .]"
25512556
puts $f "set geometry(topwidth) [winfo width .tf]"
25522557
puts $f "set geometry(topheight) [winfo height .tf]"
25532558
puts $f "set geometry(pwsash0) \"[.tf.histframe.pwclist sash coord 0]\""

0 commit comments

Comments
 (0)