[Gtk-sharp-list] Still can't show config dialog, but can show anything else

Eskil Bylund eskil.bylund at gmail.com
Sat May 12 02:54:04 EDT 2007


Hi again Aaron,

(When you said a timer thread I though you mean you were using
System.Timers, hence those links...)

You are making those Gdk threads call to make it more stable when
running on Windows, right? Ideally they shouldn't be needed because
the Gdk lock is meant to be used when calling Gtk from multiple
threads, and you aren't. Your problem now is this:

"Idles, timeouts, and input functions are executed outside of the main
GTK+ lock. So, if you need to call GTK+ inside of such a callback, you
must surround the callback with a
gdk_threads_enter()/gdk_threads_leave()   pair. (However, signals are
still executed within the main GTK+ lock.)"

>From http://developer.gnome.org/doc/API/2.0/gdk/gdk-Threads.html

That's the reason why it is recommended to use Application.Invoke
instead of calling Gtk from multiple threads and having to deal with
gdk_threads_enter()/gdk_threads_leave()...

I hope that helped,
Eskil


More information about the Gtk-sharp-list mailing list