diff src/main.c @ 1020:2bd19478ba29

improved thread support in image loader
author nadvornik
date Sun, 31 Aug 2008 09:20:29 +0000
parents 4aa1a6235458
children 9962b24b6b43
line wrap: on
line diff
--- a/src/main.c	Sun Aug 31 09:13:42 2008 +0000
+++ b/src/main.c	Sun Aug 31 09:20:29 2008 +0000
@@ -700,6 +700,8 @@
 
 #ifdef HAVE_GTHREAD
 	g_thread_init (NULL);
+	gdk_threads_init();
+	gdk_threads_enter();
 #endif
 	
 	/* init execution time counter (debug only) */
@@ -884,7 +886,10 @@
 	buf = g_build_filename(homedir(), GQ_RC_DIR, ".command", NULL);
 	remote_connection = remote_server_init(buf, cd);
 	g_free(buf);
-
+	
 	gtk_main();
+#ifdef HAVE_GTHREAD
+	gdk_threads_leave();
+#endif
 	return 0;
 }