----- Original Message -----
Sent: Tuesday, May 28, 2002 3:05 PM
Subject: Re: unexpected async reply
gnome_dialog Hell
Right revisited..... I have stuck all my GTK code
under main (gint argc, gchar *srgv[]) and it does to appear to improve things
instead of getting the weird XLib error I now get a load of GLib-WARNING **:
g_main_iterate(): main loop already active in another thread. I think this
happens while my message box is on the screen. Should I be putting some sort
of lock in my code when running a gnome_dialog from a different
thread?
Cheers
Ian
----- Original Message -----
Sent: Tuesday, May 28, 2002 10:32
AM
Subject: XLib: unexpected async reply
gnome_dialog Hell
Hi all
I have developed an application that talks to
two other applications via XML. I have created a GUI using GTK+ to display
the responses from the other apps and embedded a timer to send requests. The
problem is I developed the app single threaded and then found out that it
was too slow. So created a couple of threads to communicate with the other
apps and update the screen. I then stuck all the GTK related stuff
including gtk_main(); in a separate thread and all my widgets in a structure
hidden in a namespace that is accessible to the entire app. In main() I then
create all the threads and run em. (Forgive me if this sounds messy but
I am still quite new to GTK+ and even newer to multi-threading stuff).
Everything seems to run smoothly up until I try to create a message box from
one of the threads responsible for messaging. This is when I get the XLib
problem. I've tried using gdk_threads_enter() and leave and it hasn't made
any difference. Anyone got any ideas??
Cheers