Re: [gtk-list] Re: non-exiting gtk_exit()



> >I would expect this to work:
> > while (gtk_main_level () != 0)
> >   gtk_main_quit ();

Look at the implementations:

guint
gtk_main_level (void)
{
  return gtk_main_loop_level;
}

void
gtk_main_quit (void)
{
  g_return_if_fail (main_loops != NULL);

  g_main_quit (main_loops->data);
}
void
g_main_quit (GMainLoop *loop)
{
  g_return_if_fail (loop != NULL);

  loop->is_running = FALSE;
}


You would like to mark all the GMainLoops in the global (but static) list
`main_loops' as !is_running.

I don't think the interface allows that.  Maybe it should...

- Dave



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