Re: calling gtk_widget_queue_draw from another thread



On Wed, Nov 6, 2013 at 9:58 AM, Horst Löffel <bionicspoon web de> wrote:
Because the program acts as a plugin i have to run gtk_main in it's own
thread. But drawing operations will come from another thread which i call
"main" thread.

Many main loop implementations allow you to embed a different main
loop within them. In your "main" thread, see if you can call
gtk_main_context_iteration() regularly with may_block = FALSE instead
of running the glib main loop full time in its own thread. This should
eliminate the need for inter-thread communication.


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