Re: Problem running the GTK main loop in a separate thread (different from the main one).



O czasie 2009-08-28 13:16, taki ktos jak Cristi Cobzarenco napisac raczyl:
Hi, I've been using GTK for a pretty long time but I've never used threads
with it and I'm not able to properly run the GTK main loop in a separate
thread.More to the point if I create a window, for example, in a thread
other than the GTK one, it becomes unresponsive. Other GTK calls (that don't
create widgets) seem to work fine, however.
I've attached a sample program to show what I mean, the flag "create_in_gt"
sets whether to create the widgets in the GTK thread or in the main one.

Is this normal behaviour, am I not supposed to do this, or is it a bug?


Thou shalt not touch GUI from more than 1 thread.
Have a look at
http://blogs.operationaldynamics.com/andrew/software/gnome-desktop/gtk-thread-awareness.html
http://library.gnome.org/devel/gtk-faq/stable/x481.html

Hope that helps.

Waldek

----------------------------------------------------------------------
Szukasz pracy? Sprawd¼ nasze oferty!
http://link.interia.pl/f22b8




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