Re: [destroy event]



"Carl B. Constantine" <duckwing duckwing ca> wrote:
> I curious what (or how much) "clean up" I should do when one of my
> windows gets a destroy event by clicking the X to close the window. Do I
> have to free any memory for the window? What about if I re-use the
> window later in my application? Is it better to just call
> gtk_widget_show()/gtk_widget_hide() on the window and wait until
> application quit time?

I think you should be worrying about the delete_event signal instead, because
that's what's emitted when the user clicks on that X to close the window. If
you don't want the window to be destroyed (the default in GTK+) just hide it
instead in your signal handler and return the appropriate boolean value (I
forget) to stop further processing (and therefore window destruction) of the
signal.

It's easier in gtkmm.


Murray Cumming
murrayc usa net
www.murrayc.com





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