in reply to Re^2: Segfault in Glib/Gtk2 script
in thread Segfault in Glib/Gtk2 script
You have to be careful with the return value of a delete_event, or any Gtk sub for that matter. Adding a 1 or 0 at the end of the sub can be needed sometimes.
#These are different in a very subtle manner. $window->signal_connect( 'destroy', sub { Gtk2->main_quit() } ); $window->signal_connect(delete_event => sub { Gtk2->main_quit(); 1;});
See Gtk delete_event for more details.
From a previous problem like yours on the gtk maillist:
Returns: TRUE to stop other handlers from being invoked for the
event. FALSE to propagate the event further."
.... a return of TRUE from the delete-event
handler means "i handled this event, stop propagation."
|
|---|