[gtk+/wip/wayland-tablet: 623/632] x11: Use XInternAtom directly on poking device hardware IDs
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/wayland-tablet: 623/632] x11: Use XInternAtom directly on poking device hardware IDs
- Date: Tue, 1 Mar 2016 11:47:22 +0000 (UTC)
commit 6638402ad0d10625046766f856245588a73fc48c
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jun 30 16:28:59 2015 +0200
x11: Use XInternAtom directly on poking device hardware IDs
This way we don't cache the property if it wasn't previously there,
added by the driver itself. Bailing out is due there.
gdk/x11/gdkdevicemanager-xi2.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index c117f5b..46926af 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -345,13 +345,17 @@ get_device_ids (GdkDisplay *display,
gulong nitems, bytes_after;
guint32 *data;
int rc, format;
- Atom type;
+ Atom prop, type;
gdk_x11_display_error_trap_push (display);
+ prop = XInternAtom (GDK_DISPLAY_XDISPLAY (display), "Device Product ID", True);
+
+ if (prop == None)
+ return 0;
+
rc = XIGetProperty (GDK_DISPLAY_XDISPLAY (display),
- info->deviceid,
- gdk_x11_get_xatom_by_name_for_display (display, "Device Product ID"),
+ info->deviceid, prop,
0, 2, False, XA_INTEGER, &type, &format, &nitems, &bytes_after,
(guchar **) &data);
gdk_x11_display_error_trap_pop_ignored (display);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]