summaryrefslogtreecommitdiff
path: root/cut-n-paste-code/libegg/eggsmclient-xsmp.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-15 13:36:52 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-15 13:36:52 +0100
commit782f9380134734731a1547970d4bc9ab7b57410e (patch)
tree7eb70094291eba25b2c441871fcd87b8c3cfb6bb /cut-n-paste-code/libegg/eggsmclient-xsmp.c
parent8187e18cc3044d8a9e9da1bb959b543a2afcb980 (diff)
downloadcaja-782f9380134734731a1547970d4bc9ab7b57410e.tar.bz2
caja-782f9380134734731a1547970d4bc9ab7b57410e.tar.xz
GTK3: don't use deprecated gdk_threads_{enter/leave} ()
Since we don't ever call gdk_threads_init()
Diffstat (limited to 'cut-n-paste-code/libegg/eggsmclient-xsmp.c')
-rw-r--r--cut-n-paste-code/libegg/eggsmclient-xsmp.c13
1 files changed, 10 insertions, 3 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)
{