Re: signals of a GtkWindow



Havoc Pennington wrote :

The delete_event signal corresponds to the "X" button on most window
managers.

If your WM has two options, "Close" and "Kill", the "Kill" means "kill
the app even if the app doesn't want to die", and there is no way to
recover from it. You can only recover from the delete_event.

I replaced the "destroy" by "delete_event" :
   gtk_signal_connect(GTK_OBJECT(gr->fenetre), "delete_event",
                    GTK_SIGNAL_FUNC(quitter), (gpointer) gr);
gr->fenetre is the window i want to close, and gr is a pointer to a struct i
created to pass more than one argument to the callback 'quitter'.

When i use the "destroy" signal, i have no problem, the callback does what i
want it to do.
But when i simply replace "destroy" by "delete_event", it doesn't work, it
is as though the pointer gr pointed to nothing. It is not the 'NULL'
pointer, but I can't access any field of my struct. They are not NULL
either, but i get an error when i want to use them.

What's wrong with the delete_event ?

Thanks for your answers

Ludo





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