From a08bd0ed2f0959255dc86f7976ec42d512e813b9 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Wed, 18 Nov 2015 21:30:05 +0100 Subject: [PATCH] GTK3: don't use deprecated gdk_threads_{enter/leave} --- pluma/pluma-view.c | 8 ++++++++ pluma/smclient/eggsmclient-xsmp.c | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/pluma/pluma-view.c b/pluma/pluma-view.c index 6c76efa..293d5da 100644 --- a/pluma/pluma-view.c +++ b/pluma/pluma-view.c @@ -970,12 +970,16 @@ hide_search_window (PlumaView *view, gboolean cancel) static gboolean search_entry_flush_timeout (PlumaView *view) { +#if !GTK_CHECK_VERSION (3, 0, 0) GDK_THREADS_ENTER (); +#endif view->priv->typeselect_flush_timeout = 0; hide_search_window (view, FALSE); +#if !GTK_CHECK_VERSION (3, 0, 0) GDK_THREADS_LEAVE (); +#endif return FALSE; } @@ -1189,11 +1193,15 @@ real_search_enable_popdown (gpointer data) { PlumaView *view = (PlumaView *)data; +#if !GTK_CHECK_VERSION (3, 0, 0) GDK_THREADS_ENTER (); +#endif view->priv->disable_popdown = FALSE; +#if !GTK_CHECK_VERSION (3, 0, 0) GDK_THREADS_LEAVE (); +#endif return FALSE; } diff --git a/pluma/smclient/eggsmclient-xsmp.c b/pluma/smclient/eggsmclient-xsmp.c index df2aa58..a1a6959 100644 --- a/pluma/smclient/eggsmclient-xsmp.c +++ b/pluma/smclient/eggsmclient-xsmp.c @@ -367,9 +367,13 @@ sm_client_xsmp_startup (EggSMClient *client, xsmp->client_id = g_strdup (ret_client_id); free (ret_client_id); +#if !GTK_CHECK_VERSION (3, 0, 0) gdk_threads_enter (); +#endif gdk_x11_set_sm_client_id (xsmp->client_id); +#if !GTK_CHECK_VERSION (3, 0, 0) gdk_threads_leave (); +#endif g_debug ("Got client ID \"%s\"", xsmp->client_id); } @@ -537,7 +541,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; @@ -562,7 +568,9 @@ idle_do_pending_events (gpointer data) } out: +#if !GTK_CHECK_VERSION (3, 0, 0) gdk_threads_leave (); +#endif return FALSE; } @@ -1284,9 +1292,13 @@ process_ice_messages (IceConn ice_conn) { IceProcessMessagesStatus status; +#if !GTK_CHECK_VERSION (3, 0, 0) gdk_threads_enter (); +#endif status = IceProcessMessages (ice_conn, NULL, NULL); +#if !GTK_CHECK_VERSION (3, 0, 0) gdk_threads_leave (); +#endif switch (status) {