]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 739401 ] gtk_init() has to be called before gdk_threads_enter()
authorJulian Smart <julian@anthemion.co.uk>
Wed, 21 May 2003 18:54:27 +0000 (18:54 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 21 May 2003 18:54:27 +0000 (18:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/app.cpp
src/gtk1/app.cpp

index bc09ab826363c2ea1f77a132f7380be996cc5200..1bf855421b6b23cfeb3d90ea707a3168b2fadaa3 100644 (file)
@@ -803,10 +803,11 @@ int wxEntryStart( int& argc, char *argv[] )
     if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
 #endif
 
     if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
 #endif
 
-    gdk_threads_enter();
-
     gtk_init( &argc, &argv );
 
     gtk_init( &argc, &argv );
 
+    /* we can not enter threads before gtk_init is done */
+    gdk_threads_enter();
+
     wxSetDetectableAutoRepeat( TRUE );
 
     if (!wxApp::Initialize())
     wxSetDetectableAutoRepeat( TRUE );
 
     if (!wxApp::Initialize())
index bc09ab826363c2ea1f77a132f7380be996cc5200..1bf855421b6b23cfeb3d90ea707a3168b2fadaa3 100644 (file)
@@ -803,10 +803,11 @@ int wxEntryStart( int& argc, char *argv[] )
     if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
 #endif
 
     if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
 #endif
 
-    gdk_threads_enter();
-
     gtk_init( &argc, &argv );
 
     gtk_init( &argc, &argv );
 
+    /* we can not enter threads before gtk_init is done */
+    gdk_threads_enter();
+
     wxSetDetectableAutoRepeat( TRUE );
 
     if (!wxApp::Initialize())
     wxSetDetectableAutoRepeat( TRUE );
 
     if (!wxApp::Initialize())