From 8ea8868b6e6cfa626905b52b4b94b10b60d43139 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Mon, 16 Nov 2015 14:02:19 +0100 Subject: GTK3: use gdk_error_trap_pop_ignored() when appropriate taken from: https://git.gnome.org/browse/gnome-settings-daemon/commit/?id=544526d --- plugins/a11y-keyboard/msd-a11y-keyboard-manager.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'plugins/a11y-keyboard') diff --git a/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c b/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c index 7696d16..0d7f926 100644 --- a/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c +++ b/plugins/a11y-keyboard/msd-a11y-keyboard-manager.c @@ -185,7 +185,11 @@ get_xkb_desc_rec (MsdA11yKeyboardManager *manager) desc->ctrls = NULL; status = XkbGetControls (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), XkbAllControlsMask, desc); } +#if GTK_CHECK_VERSION (3, 0, 0) + gdk_error_trap_pop_ignored (); +#else gdk_error_trap_pop (); +#endif g_return_val_if_fail (desc != NULL, NULL); g_return_val_if_fail (desc->ctrls != NULL, NULL); @@ -392,7 +396,11 @@ set_server_from_settings (MsdA11yKeyboardManager *manager) XkbFreeKeyboard (desc, XkbAllComponentsMask, True); XSync (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), FALSE); +#if GTK_CHECK_VERSION (3, 0, 0) + gdk_error_trap_pop_ignored (); +#else gdk_error_trap_pop (); +#endif mate_settings_profile_end (NULL); } @@ -1073,7 +1081,11 @@ restore_server_xkb_config (MsdA11yKeyboardManager *manager) XkbAllComponentsMask, True); XSync (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), FALSE); +#if GTK_CHECK_VERSION (3, 0, 0) + gdk_error_trap_pop_ignored (); +#else gdk_error_trap_pop (); +#endif manager->priv->original_xkb_desc = NULL; } -- cgit v1.2.1