Gtk+ is thread aware but not thread safe. This means that you have to 1. Initialise both GLib and Gdk for threaded operation: 2. Pause and resume the Gdk main loop when carrying out operations on Gtk+ objects. This is a locking mechanism. You can see how this is implemented in gsirc at http://wwww.atoker.com/gsirc/