Re: GLib-CRITICAL Source ID 35 was not found when attempting to remove it
- Date: Tue, 15 Sep 2015 23:27:24 -0700
- From: Christian Hergert <christian@xxxxxxxxxx>
- Subject: Re: GLib-CRITICAL Source ID 35 was not found when attempting to remove it
On 09/15/2015 09:03 PM, Lokesh Chakka wrote:
> static void *thread_function( void *parameter )
> const int seconds = 1000;
> for( i=0; i<seconds; i++ )
> gtk_widget_queue_draw( (GtkWidget*)darea );
It's not okay to touch Gtk+ widgets from a thread other than the main
thread owning the gtk main loop.
Try using g_timeout_add() to get a callback within the mainloop and do
your gtk_widget_queue_draw() from there.
gtk-devel-list mailing list