emitting the "delete_event" in a "key_press_event" --> crash



Hi all,

I want my dialogs to close when the user presses the escape key. So I
attached to the key_press_event, and if the key is escape I emit the
delete event. Immediately the delete event destroys the window, and then
the programs continues with the key-press-event (on a widget that doesn't
exist anymore!!) and crashes (tha backtrace says it segfaults somewhere
inside gtk).

how do I do this in a way that doesn't crash gtk?

regards,
        Olivier




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