Multithreading and dialog boxes
- From: Jean-Yves Lefort <jylefort brutele be>
- To: gtk-list gnome org
- Subject: Multithreading and dialog boxes
- Date: Sat, 22 Jun 2002 12:13:19 +0200
Hi,
(Gtk2) Whenever I run a dialog box from inside a thread, the dialog box
never gets destroyed, and it hangs my application:
void dialog (void) {
GtkWidget *dialog;
gdk_threads_enter();
dialog = gtk_message_dialog_new(NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK,
"Sample message");
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
gdk_threads_leave();
}
It works fine when called within the main thread, btw.
Any clue?
Regards,
Jean-Yves Lefort
--
Jean-Yves Lefort
jylefort brutele be
http://void.adminz.be/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]