aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk
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
commitcd64c66c16be907fb0d35ffca3e90208d16ee519 (patch)
tree388243bd6de28004e2a81214056a96e6122ec1da /gtk
parent5c9a5f1e38b4a2353799542b1d53feb08d8161bb (diff)
downloadscintilla-mirror-cd64c66c16be907fb0d35ffca3e90208d16ee519.tar.gz
Avoid deprecated threads APIs when using GDK >= 3.6.
Diffstat (limited to 'gtk')
-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;
}