diff options
author | Wolfgang Ulbrich <[email protected]> | 2015-11-16 14:02:19 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2015-12-02 12:54:10 +0100 |
commit | 8ea8868b6e6cfa626905b52b4b94b10b60d43139 (patch) | |
tree | 8b280cf03d6569a1991f82b3449f8714bd31ebed /plugins/common | |
parent | ef58118cad934b5fa5bf5ca1abe2d7f3d6f56836 (diff) | |
download | mate-settings-daemon-8ea8868b6e6cfa626905b52b4b94b10b60d43139.tar.bz2 mate-settings-daemon-8ea8868b6e6cfa626905b52b4b94b10b60d43139.tar.xz |
GTK3: use gdk_error_trap_pop_ignored() when appropriate
taken from:
https://git.gnome.org/browse/gnome-settings-daemon/commit/?id=544526d
Diffstat (limited to 'plugins/common')
-rw-r--r-- | plugins/common/msd-input-helper.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 <gdk/gdk.h> #include <gdk/gdkx.h> +#include <gtk/gtk.h> #include <sys/types.h> #include <X11/Xatom.h> @@ -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; |