Re: [gtk-list] gtk_main_quit() and destruction
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] gtk_main_quit() and destruction
- Date: Thu, 18 Feb 1999 12:34:51 +0100 (CET)
On 18 Feb 1999, Hrvoje Niksic wrote:
> When gtk_main_quit() is invoked, are the destruction callbacks
> properly called? Specifically, I would expect the "destroy" callback
> to be called after gtk_main_quit() is used to kill off the whole
> thing.
>
> Take this code: it sets up a window, realizes it, and adds a timeout
> that makes sure gtk_main_quit() is called as soon as gtk_main_loop()
> is entered. Here I would expect the "destroy" handler to be invoked,
> but apparently it isn't.
>
> How do I make sure my "destroy" handler is invoked even in the face of
> gtk_main_quit()? I need it to make sure that some cleanups are done
> (e.g. processes killed) when the windows associated to them get
> destroyed.
for automated window destruction after gtk_main_quit() you can use:
gtk_quit_add_destroy (1, window);
if you need a simple callback that is not associated with a widget's
destruction, you can use gtk_quit_add (1, func, data); with
gint func (gpointer data) { return FALSE; }
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]