Re: Threads in GTK goofing up expose event



Neil Hodge <neh attbi com> writes:

There is something that should be in the faq, that (as I recall) isn't...
I'm not sure if this is your problem or not.

If you do GTK+ stuff in a separate thread from where your main loop
is running, you should generally end the sequence of calls with a 
call to gdk_flush() before you call gdk_threads_leave() ... otherwise you 
may have queued X requests that aren't sent out.


Well, that did not work, and that was my last hope.  So, I think I will
just reorganize my app so that all of the gtk calls are in the main
thread.  Thanks.

A further note on this ... I spent some time helping someone with
a similar problem on IRC and it turned out that there was a very
simple solution to their problems... they had missed the fact that
with GTK+-2.0, you have to call gdk_threads_init() as well as
g_threads_init().

FWIW...
                                        Owen



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