From: Mark Levedahl Date: Thu, 08 Feb 2007 16:55:28 GMT Subject: Re: [PATCH] Make gitk save and restore the user set window position. Message-ID: In-Reply-To: <491753.81112.qm@web38915.mail.mud.yahoo.com> "Brett Schwarz" wrote in message news:491753.81112.qm@web38915.mail.mud.yahoo.com... >> >> Mark >> > > I've only been half following this thread, so I apologize if this was > already talked about. > > Have you tried [wm protocol] command. You would use it like this: > > wm protocol . WM_DELETE_WINDOW do_quit > > This basically traps the signal from the windowmanager, and [do_quit] > gets executed *before* the gui is torn down. The only bad thing about > this, is if you explicitly destroy a widget inside your code (i.e. > [destroy .]), then this will *not* get invoked. You also need to make > sure you catch any possible errors in do_quit, otherwise the gui will > hang. > > HTH, > --brett > Thank you - that is exactly what I was looking for but couldn't find. I'll generate another patch tonight. Mark