diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-11-04 04:52:18 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2009-11-04 04:52:18 +0000 |
commit | b7c1d2f196fc3557202e41a4abfe117910947400 (patch) | |
tree | 0e0fed153e6db63792205e6f269421180c2e1512 /src/main.c | |
parent | 4d5df10a3e521bbb3918d5844e8521af901b6fdf (diff) |
fixed a bug that prohibited query search on IMAP folders. Don't call gtk_main_iteration() from non-main threads.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2330 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -113,6 +113,10 @@ static gint lock_socket = -1; static gint lock_socket_tag = 0; static GIOChannel *lock_ch = NULL; +#if USE_THREADS +static GThread *main_thread; +#endif + static struct RemoteCmd { gboolean receive; gboolean receive_all; @@ -618,6 +622,11 @@ static void thread_leave_func(void) static void event_loop_iteration_func(void) { + if (g_thread_self() != main_thread) { + g_fprintf(stderr, "event_loop_iteration_func called from non-main thread (%p)\n", g_thread_self()); + g_usleep(10000); + return; + } gtk_main_iteration(); } #endif @@ -633,6 +642,7 @@ static void app_init(void) gdk_threads_set_lock_functions(thread_enter_func, thread_leave_func); gdk_threads_init(); + main_thread = g_thread_self(); } #endif syl_init(); |