Re: drawing area & multithreading



Giaslas Georgios <giaslas@ceid.upatras.gr> writes:

> hi,
> i have the following problem.
> if i have a non-multithreaded program with a drawing area and i call
> gtk_widget_draw, it calls the expose event fuction which calls
> gdk_draw_rectangle and
> then the drawing area updates normally.
> the problem is that if i create another thread and call gtk_widget_draw
> from that thread the expose event function is called, but the drawing
> area isn't updated until i focus/unfocus the window or some widget in the
> window.
> 
> can you help me with that?

Call gdk_flush() in the thread once you are finished drawing.

Regards,
                                        Owen




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