Re: glib - main event loop
On Tue, 15 Mar 2016 00:00:37 +0100
Krzysztof <kj@xxxxxxxxxxxx> wrote:
> How to get idle event source called in main event loop? I do the
> my idle function is:
> static gboolean
> idle ( gpointer data )
> g_print ( "Idle called\n" );
> if ( counter1 == 0 && counter2 == 0 )
> g_main_loop_quit ( ( GMainLoop * ) data );
> return FALSE;
> return TRUE;
> The variables counter1 and counter2 reach 0 after some time of
> I add this source this way:
> g_idle_add ( idle, mlp );
> GMainLoop *mlp;
> is loop which is run.
> Even if all sources end with G_SOURCE_REMOVE the idle source is never
>From your incomplete code it is impossible to say. Do you call
g_main_loop_run()? How did you construct your main loop?
Try to post a complete (but minimal) example of what you are doing.
gtk-list mailing list