{"thread":{"id":"20881","subject":"[PATCH] gitk: restore wm state to normal before saving geometry information","startedAt":"2009-09-08T18:44:20Z","lastAt":"2009-09-08T18:44:20Z","messageCount":1,"participants":["Alexey Borzenkov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"122717","messageId":"e2480c70909081144m7bd936fawfade280488cb0680@mail.gmail.com","threadId":"20881","inReplyTo":null,"subject":"[PATCH] gitk: restore wm state to normal before saving geometry information","fromName":"Alexey Borzenkov","fromEmail":"snaury@gmail.com","sentAt":"2009-09-08T18:44:20Z","receivedAt":"2009-09-08T18:44:20Z","isPatch":true,"sender":{"key":"snaury@gmail.com","avatar":"https://gravatar.com/avatar/dd9f652303405e256f31e18690cea19ffcf21b83b04f746957334f62e399d95d?d=mp&s=160"},"body":"gitk now includes patches for saving and restoring wm state, however\nbecause it saves wm geometry when window can still be maximized the\nmaximize/restore button becomes useless after restarting gitk (you\nwill get a huge displaced window if you try to restore it). This\npatch fixes this issue by storing window geometry in normal state.\n\nSigned-off-by: Alexey Borzenkov <snaury@gmail.com>\n---\n Please don't forget to cc me if you have comments/questions\n\n gitk |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 8c08310..fedeb88 100755\n--- a/gitk\n+++ b/gitk\n@@ -2555,8 +2555,11 @@ proc savestuff {w} {\n \tputs $f [list set extdifftool $extdifftool]\n \tputs $f [list set perfile_attrs $perfile_attrs]\n\n-\tputs $f \"set geometry(main) [wm geometry .]\"\n \tputs $f \"set geometry(state) [wm state .]\"\n+\tif {[wm state .] eq {zoomed}} {\n+\t\twm state . normal\n+\t}\n+\tputs $f \"set geometry(main) [wm geometry .]\"\n \tputs $f \"set geometry(topwidth) [winfo width .tf]\"\n \tputs $f \"set geometry(topheight) [winfo height .tf]\"\n         puts $f \"set geometry(pwsash0) \\\"[.tf.histframe.pwclist sash\ncoord 0]\\\"\"\n-- \n1.6.4.2\n"}]}