Move initialization around a bit - locking the gdk mutex is a no-op before

gdk is initialized (via gtk_init). So lock it *after* initializiation.
Fixes PR pkg/21481, thanks to Nathan for debugging hints.
This commit is contained in:
martin 2003-05-16 22:15:27 +00:00
parent a518845ec6
commit def45b9663
2 changed files with 20 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.7 2003/03/31 17:44:21 jmmv Exp $
$NetBSD: distinfo,v 1.8 2003/05/16 22:15:27 martin Exp $
SHA1 (wxGTK-2.4.0.tar.gz) = fe01881af71c9f8ae9210d06cad7adf7f0b0662d
Size (wxGTK-2.4.0.tar.gz) = 6605789 bytes
@ -6,3 +6,4 @@ SHA1 (patch-aa) = 5602ed3a9c15eab638f270990b91edc844a1e6e3
SHA1 (patch-ab) = 6417fc7faaa0b8db5f2bc6d54c7e0bf48b78370a
SHA1 (patch-ac) = 3405f5d82ba84fabd555bc240fce47b166d8efc0
SHA1 (patch-ad) = 1ee314f895451dfab8bf56952ad2822b8530590f
SHA1 (patch-ae) = 4a9fef326b515ceae599a1536d0f9a5eb2096af2

View file

@ -0,0 +1,18 @@
$NetBSD: patch-ae,v 1.1 2003/05/16 22:15:28 martin Exp $
--- src/gtk/app.cpp.orig 2003-05-17 00:06:30.000000000 +0200
+++ src/gtk/app.cpp 2003-05-17 00:07:13.000000000 +0200
@@ -799,10 +799,11 @@
if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
#endif
- gdk_threads_enter();
-
gtk_init( &argc, &argv );
+ /* we can not enter threads before gtk_init is done */
+ gdk_threads_enter();
+
wxSetDetectableAutoRepeat( TRUE );
if (!wxApp::Initialize())