[clutter/msvc-support-master] Don't init the Big Clutter Lock on Win32



commit f6acae9f3d92a324c80ec07a94515e13692a2843
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Oct 24 17:17:39 2011 +0800

    Don't init the Big Clutter Lock on Win32
    
    Since the Windows GUI system is assuming multithreadedness, initializing
    locks after entering the GUI portion on Windows is likely to cause
    problems[1][2], which results many Clutter programs to crash due to
    releasing resources that they did not own.
    
    [1]: Multi-threaded use of GTK+ on Win32 in README.win32 of GTK+ source package
    [2]: Explanation of Windows GUI system regarding its multithreadness
         assumtopns-http://lists-archives.org/gtk/12724-compiling-a-gtk-application-on-windows.html

 clutter/clutter-main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index 7d4d815..80d7bf8 100644
--- a/clutter/clutter-main.c
+++ b/clutter/clutter-main.c
@@ -215,11 +215,13 @@ clutter_threads_init_default (void)
 {
   g_mutex_init (&clutter_threads_mutex);
 
+#ifndef HAVE_CLUTTER_WIN32
   if (clutter_threads_lock == NULL)
     clutter_threads_lock = clutter_threads_impl_lock;
 
   if (clutter_threads_unlock == NULL)
     clutter_threads_unlock = clutter_threads_impl_unlock;
+#endif
 }
 
 #define ENVIRONMENT_GROUP       "Environment"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]