summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cut-n-paste-code/libegg/eggsmclient-xsmp.c13
-rw-r--r--eel/eel-canvas.c4
-rw-r--r--libcaja-private/caja-thumbnails.c4
-rw-r--r--src/caja-pathbar.c5
4 files changed, 22 insertions, 4 deletions
diff --git a/cut-n-paste-code/libegg/eggsmclient-xsmp.c b/cut-n-paste-code/libegg/eggsmclient-xsmp.c
index e429bcc2..263d78ac 100644
--- a/cut-n-paste-code/libegg/eggsmclient-xsmp.c
+++ b/cut-n-paste-code/libegg/eggsmclient-xsmp.c
@@ -371,13 +371,13 @@ sm_client_xsmp_startup (EggSMClient *client,
xsmp->client_id = g_strdup (ret_client_id);
free (ret_client_id);
- gdk_threads_enter ();
#if GTK_CHECK_VERSION (3, 0, 0)
gdk_x11_set_sm_client_id (xsmp->client_id);
#else
+ gdk_threads_enter ();
gdk_set_sm_client_id (xsmp->client_id);
-#endif
gdk_threads_leave ();
+#endif
g_debug ("Got client ID \"%s\"", xsmp->client_id);
}
@@ -545,7 +545,9 @@ idle_do_pending_events (gpointer data)
EggSMClientXSMP *xsmp = data;
EggSMClient *client = data;
+#if !GTK_CHECK_VERSION (3, 0, 0)
gdk_threads_enter ();
+#endif
xsmp->idle = 0;
@@ -570,7 +572,9 @@ idle_do_pending_events (gpointer data)
}
out:
+#if !GTK_CHECK_VERSION (3, 0, 0)
gdk_threads_leave ();
+#endif
return FALSE;
}
@@ -1291,10 +1295,13 @@ static gboolean
process_ice_messages (IceConn ice_conn)
{
IceProcessMessagesStatus status;
-
+#if GTK_CHECK_VERSION (3, 0, 0)
+ status = IceProcessMessages (ice_conn, NULL, NULL);
+#else
gdk_threads_enter ();
status = IceProcessMessages (ice_conn, NULL, NULL);
gdk_threads_leave ();
+#endif
switch (status)
{
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c
index f1f7068d..55d983c8 100644
--- a/eel/eel-canvas.c
+++ b/eel/eel-canvas.c
@@ -3269,7 +3269,9 @@ idle_handler (gpointer data)
{
EelCanvas *canvas;
+#if !GTK_CHECK_VERSION (3, 0, 0)
GDK_THREADS_ENTER ();
+#endif
canvas = EEL_CANVAS (data);
do_update (canvas);
@@ -3277,7 +3279,9 @@ idle_handler (gpointer data)
/* Reset idle id */
canvas->idle_id = 0;
+#if !GTK_CHECK_VERSION (3, 0, 0)
GDK_THREADS_LEAVE ();
+#endif
return FALSE;
}
diff --git a/libcaja-private/caja-thumbnails.c b/libcaja-private/caja-thumbnails.c
index 7e279858..211dce8e 100644
--- a/libcaja-private/caja-thumbnails.c
+++ b/libcaja-private/caja-thumbnails.c
@@ -277,7 +277,9 @@ thumbnail_thread_notify_file_changed (gpointer image_uri)
{
CajaFile *file;
+#if !GTK_CHECK_VERSION (3, 0, 0)
gdk_threads_enter ();
+#endif
file = caja_file_get_by_uri ((char *) image_uri);
#ifdef DEBUG_THUMBNAILS
@@ -294,7 +296,9 @@ thumbnail_thread_notify_file_changed (gpointer image_uri)
}
g_free (image_uri);
+#if !GTK_CHECK_VERSION (3, 0, 0)
gdk_threads_leave ();
+#endif
return FALSE;
}
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c
index 667046e6..8b8cd1ef 100644
--- a/src/caja-pathbar.c
+++ b/src/caja-pathbar.c
@@ -1206,7 +1206,9 @@ caja_path_bar_scroll_timeout (CajaPathBar *path_bar)
{
gboolean retval = FALSE;
+#if !GTK_CHECK_VERSION (3, 0, 0)
GDK_THREADS_ENTER ();
+#endif
if (path_bar->timer)
{
@@ -1236,8 +1238,9 @@ caja_path_bar_scroll_timeout (CajaPathBar *path_bar)
}
}
-
+#if !GTK_CHECK_VERSION (3, 0, 0)
GDK_THREADS_LEAVE ();
+#endif
return retval;
}