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/common/msd-input-helper.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'plugins/common') diff --git a/plugins/common/msd-input-helper.c b/plugins/common/msd-input-helper.c index 5043e35..d663afe 100644 --- a/plugins/common/msd-input-helper.c +++ b/plugins/common/msd-input-helper.c @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -65,11 +66,19 @@ device_is_touchpad (XDeviceInfo deviceinfo) if ((XGetDeviceProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), device, prop, 0, 1, False, XA_INTEGER, &realtype, &realformat, &nitems, &bytes_after, &data) == Success) && (realtype != None)) { +#if GTK_CHECK_VERSION (3, 0, 0) + gdk_error_trap_pop_ignored (); +#else gdk_error_trap_pop (); +#endif XFree (data); return device; } +#if GTK_CHECK_VERSION (3, 0, 0) + gdk_error_trap_pop_ignored (); +#else gdk_error_trap_pop (); +#endif XCloseDevice (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), device); return NULL; -- cgit v1.2.1