[f18-alpha] [PATCH] Use Gtk.main_level() to check if main loop is already running
Chris Lumens
clumens at redhat.com
Mon Aug 27 14:56:27 UTC 2012
> For some reason GLib.main_depth() stopped working and returns 0
> even if Gtk.main loop is already running. This leads to crashes
> and hangs of whole GUI when exception appears in a thread
> different from the main one.
Yeah, I think this is how it's supposed to work. If you look at the
docs for g_main_depth, you'll see it returns a 0 when called from the
toplevel, and a number depending on how many recursive calls are stacked
up.
So yeah, Gtk.main_level looks to be the right thing to use here.
- Chris
More information about the anaconda-patches
mailing list