I've written an event event handler for my window's File->Quit button:
void on_file_quit() {
int err = pthread_cancel( work );
if (err) {
std::cerr << "no thread to cancel\n";
}
else {
pthread_join( work, NULL );
}
}
instantiating it this way:
pfile_quit->signal_activate().connect( sigc::ptr_fun(on_file_quit) );
I would like to make then close the window at the end of on_file_quit(), as in pressing the close button at the top of the window. I haven't found the solution anywhere. Thanks in advance for any help!