Re: glib - main event loop

Thanks Chris. It worked.
Does it mean that idle source can be effectively added to global loop only? Can't I have idle source in other contexts?

On 03/16/2016 01:46 PM, Chris Vine wrote:
On Tue, 15 Mar 2016 20:03:20 +0100
Krzysztof <kj limes com pl> wrote:
On 03/15/2016 12:54 AM, Chris Vine wrote:
  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.

Thanks for reply. Here is the complete code:

I do not think that can reasonably be described as a minimal example.

However, you have not constructed a default main loop, which is what
g_idle_add() will execute in.  Set mcx to NULL and don't call
g_main_context_new() and your code should work.


Krzysztof J

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