Re: Window geometry obtaining question




On Mon, 10 May 1999, Mike Bond wrote:
> 
> Problem is that I don't explicitly destroy the text widget, it gets
> destroyed implicitly when the top level app widget gets destroyed, which
> can be destroyed implicitly if there is a window manager close.
> 

Right. I'd say connect a delete_event handler to the toplevel window to
catch the window manager close situation. If you return TRUE from this
handler, the implicit destroy won't happen. Instead, write a
close_my_window() function and use it in the delete event handler, and
also (for example) in the callback for your "Close" menu item if you have
one, etc. In close_my_window() save your geometry, make sure files are
saved, and all that fun stuff.

Other arrangements are also possible of course, but this seems like a
reasonable way to do it.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]