aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2013-01-01 18:16:18 +1100
committerNeil Hodgson <nyamatongwe@gmail.com>2013-01-01 18:16:18 +1100
commit15fa779b9f0a6e83bb3af2e43574106260e8bf17 (patch)
tree3d95156f185116f6b1b36ab4e09c027947aa6278
parent787af434dbee95c96b68b0342213107ab3f9af2f (diff)
downloadscintilla-mirror-15fa779b9f0a6e83bb3af2e43574106260e8bf17.tar.gz
Avoid deprecated threads APIs when using GDK >= 3.6.
-rw-r--r--gtk/ScintillaGTK.cxx8
1 files changed, 8 insertions, 0 deletions
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;
}