Re: Catching "destroy" signals
- From: Russell Shaw <rjshaw iprimus com au>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Catching "destroy" signals
- Date: Tue, 18 Nov 2003 10:47:53 +1100
Daniel Haude wrote:
On Mon, 17 Nov 2003, Russell Shaw wrote:
What do you mean "closing from outside"?
I mean that the main application top-level window (A), upon being closed,
makes another top-level window (B) disappear as well.
I've now managed to build a GDK_DELETE event structure (within the
"delete_event" callback of A) which I can send to B by feeding it into the
event loop using gdk_event_put(). This deletes window B good and proper;
all I now have to do is somehow keep the main loop from getting stopped
prematurely by the call to gtk_main_quit() which happens in A's "destroy"
event handler. I'll probably try the following loop:
while (gtk_events_pending()) {
gtk_main_iteration_do();
}
gtk_main_quit();
I have two toplevel windows, and when one is closed from the window manager
frame, the other also closes. Both windows have this:
g_signal_connect(G_OBJECT(window),"delete_event",G_CALLBACK(gtk_main_quit),NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]