I have a GTK + JACK application... GTK handles the main loop and events, obviously, and the Jack Audio Connection Kit handles audio, calling a callback function in a different thread periodically.
To simplify the example.. let's say I have a GTK Oscillator... The window's contents change whenever JACK calls my callback. At that point I need to redraw it. What's the best way of doing this?
Currently, from my callback I use "gtk_widget_queue_draw", but this doesn't seem to work. The main loop in the main thread is still "sleeping", and it won't process my signal until something else 'wakes it up'... so what's the proper way to trigger a redraw from another thread?
Akel, did you remember to make all gtk calls in the thread
in between gdk_threads_enter() and gdk_threads_leave() calls?
All GTK calls from a thread should be done like that.
See important info here: