summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-06-12 03:52:43 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-06-12 03:52:43 (GMT)
commit39fa2a983d55b37759b99e67f9f1892879efb775 (patch)
tree1be07eaef87b5c614b4b8559c91ddb62e6342c8a /git-gui.sh
parentb2f3bb1b66d9422aa5049f994c6e370a18d89759 (diff)
downloadgit-39fa2a983d55b37759b99e67f9f1892879efb775.zip
git-39fa2a983d55b37759b99e67f9f1892879efb775.tar.gz
git-39fa2a983d55b37759b99e67f9f1892879efb775.tar.bz2
git-gui: Save geometry before the window layout is damaged
Because Tk does not assure us the order that it will process children in before it destroys the main toplevel we cannot safely save our geometry data during a "bind . <Destroy>" event binding. The geometry may have already changed as a result of a one or more children being removed from the layout. This was pointed out in gitk by Mark Levedahl, and patched over there by commit b6047c5a8166a71e01c6b63ebbb67c6894d95114. So we now also use "wm protocol . WM_DELETE_WINDOW" to detect when the window is closed by the user, and forward that close event to our main do_quit routine. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 0aecf41..97de595 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1622,7 +1622,7 @@ unset browser doc_path doc_url
# -- Standard bindings
#
-bind . <Destroy> {if {{%W} eq {.}} do_quit}
+wm protocol . WM_DELETE_WINDOW do_quit
bind all <$M1B-Key-q> do_quit
bind all <$M1B-Key-Q> do_quit
bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}