diff options
Diffstat (limited to 'src/Applet/Applet.cpp')
| -rw-r--r-- | src/Applet/Applet.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp index cc40642..b33cc9f 100644 --- a/src/Applet/Applet.cpp +++ b/src/Applet/Applet.cpp @@ -38,7 +38,11 @@ crash_notify_cb(const char* progname) int main(int argc, char **argv) { - Gtk::Main kit(argc, argv); + /* need to be thread safe */ + g_thread_init(NULL); + gdk_threads_init(); + gdk_threads_enter(); + gtk_init(&argc,&argv); applet = new CApplet(); /* move to the DBusClient::connect */ DBus::Glib::BusDispatcher dispatcher; @@ -49,6 +53,7 @@ int main(int argc, char **argv) DBus::Connection conn = DBus::Connection::SystemBus(); CDBusClient client(conn, CC_DBUS_PATH, CC_DBUS_NAME); client.ConnectCrashHandler(crash_notify_cb); - Gtk::Main::run(); + gtk_main(); + gdk_threads_leave(); return 0; } |
