running gtk_main in a thread?

hi there,

i am implementing an audio plugin and use gtk for the gui.
the problem is, that the audio app calls me to give me data,
but the intervalls can be to long to have an usable gui.
   note: i was not using gtk_main but *gtk*.main_iteration_do()

first i thought it would be a solution to start a thread an start
the gtk main there. the window was getting shown but not updated.
the i tried the *gtk*.main_iteration_do() there (nonblocking) the loop in there
was executed fine but the window was still not updated.
then i tried the blocking version. but after 13 call to *gtk*.main_iteration_do()
it hangs somewhere inside.

it looks like gtk is not getting events when it is running in a thread. could it be
that only messages for the current thread?

uhmf, i was looking at the win api docs GetMessage gets the messages for the current
thread! i guess thats the "problem". i create the window in the mainthread

ok, this mail becomes a litle pointless because i have solved the problem while writing
this, but i still wonder if gtk behaves the same way on linux.

thanks for reading this.

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