Opening a background window in a separate thread



Hi,

Is this possible? I've been trying to get it to work without success. What I
want to do is to open a "help" window that the user can keep open while they
are working in the main app window. So I tried launching a separate thread
for it and in that thread creating either a top level window or (preferably)
a dialog window, but I can't get either to work. The window gets created and
displayed fine, but trying to then call gtk_main() or gtk_dialog_run() in
the 2nd thread doesn't work.

I think I followed everything in the FAQ about thread-safe calls, but the
FAQ doesn't cover different threads simultaneously running different
windows. In fact, putting gdk_threads_enter() / gdk_threads_leave() around
gtk_main() in the main thread as per the FAQ simply blocks another thread
from using those to protect its own gtk_main or gtk_dialog_run calls.

Anyone know if there is a way that two threads can simultaneously have two
different windows open and running?

Ian




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