delete-event of GtkWidget



Hi all,

when I write big dialogs, I create it only once, keep the pointer to
the dialog and show it everytime I need it. In the response callback I
just use gtk_widget_hide to let the dialog disappear. This works as
expected and all is fine.

On my Debian Etch(same for Sarge) I don't need to handle the
delete-event signal of the dialog. If it is triggered the dialog just
disappears and until now I thought it is just hidden. But according to
the API documenation the dialog should be actually destroyed. An user
of my application reported crashes in Puppylinux and while
investigating the code I noticed that there the dialog is indeed
destroyed and not just hidden. In Debian the dialog doesn't get
destroyed or whatever happens there, I can still use the dialog
afterwards. In Puppylinux my app crashes because the dialog was
destroyed and so the stored pointer to the dialog points so some
invalid memory.

Does anyone know anything about that different behaviour? I guess
Debian's GTK behaves incorrectly or at least unusual, any other distros?
Or am I missing something?

Btw, connecting to the delete-event and registering
gtk_widget_hide_on_delete() as callback solved the problem.

Regards,
Enrico

P.S.: I know this is a bit off-topic but I'm interested in experiences
with other distros and here are many GTK users ;-).

--
Get my GPG key from http://www.uvena.de/pub.key


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