summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-04-12 11:06:30 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-04-12 11:07:16 +0100
commit6a0757f0e0fb4fe4b837f44b2bc9ca6455fa1c5d (patch)
tree7ebdbb4f055f04302edb57ca889a8a0644c12d09 /vcl/unx
parent0754dde7aa38317522a3d2aa0be7fe364b878644 (diff)
fdo#60690 - a little more cleanup of gtk+ mutex bits.
Change-Id: I020d6f59751aef0bfb06667317ddcaf2965395d1
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx24
1 files changed, 10 insertions, 14 deletions
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index af80678a8829..1bb4bed482a8 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -61,18 +61,6 @@ extern "C"
GtkYieldMutex *pYieldMutex = GET_YIELD_MUTEX();
pYieldMutex->ThreadsLeave();
}
- static bool hookLocks( void )
- {
-#if !GTK_CHECK_VERSION(2,4,0)
-#error No lock hooking!
-#endif
- gdk_threads_set_lock_functions (GdkThreadsEnter, GdkThreadsLeave);
-
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "Hooked gdk threads locks\n" );
-#endif
- return true;
- }
VCLPLUG_GTK_PUBLIC SalInstance* create_SalInstance( oslModule )
{
@@ -113,8 +101,16 @@ extern "C"
if ( !g_thread_supported() )
g_thread_init( NULL );
- if ( hookLocks() )
- pYieldMutex = new GtkYieldMutex();
+#if !GTK_CHECK_VERSION(2,4,0)
+#error "Requires gtk 2.4.0+ for lock hooking"
+#endif
+ gdk_threads_set_lock_functions (GdkThreadsEnter, GdkThreadsLeave);
+
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "Hooked gdk threads locks\n" );
+#endif
+
+ pYieldMutex = new GtkYieldMutex();
gdk_threads_init();