From 15fa779b9f0a6e83bb3af2e43574106260e8bf17 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Tue, 1 Jan 2013 18:16:18 +1100 Subject: Avoid deprecated threads APIs when using GDK >= 3.6. --- gtk/ScintillaGTK.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 8a09b105b..729db64ee 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2740,7 +2740,9 @@ int ScintillaGTK::TimeOut(ScintillaGTK *sciThis) { gboolean ScintillaGTK::IdleCallback(ScintillaGTK *sciThis) { // Idler will be automatically stopped, if there is nothing // to do while idle. +#ifndef GDK_VERSION_3_6 gdk_threads_enter(); +#endif bool ret = sciThis->Idle(); if (ret == false) { // FIXME: This will remove the idler from GTK, we don't want to @@ -2748,14 +2750,20 @@ gboolean ScintillaGTK::IdleCallback(ScintillaGTK *sciThis) { // returns false (although, it should be harmless). sciThis->SetIdle(false); } +#ifndef GDK_VERSION_3_6 gdk_threads_leave(); +#endif return ret; } gboolean ScintillaGTK::StyleIdle(ScintillaGTK *sciThis) { +#ifndef GDK_VERSION_3_6 gdk_threads_enter(); +#endif sciThis->IdleStyling(); +#ifndef GDK_VERSION_3_6 gdk_threads_leave(); +#endif // Idler will be automatically stopped return FALSE; } -- cgit v1.2.3