[gnome-settings-daemon] common: Return -1 on error getting the stylus ID
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] common: Return -1 on error getting the stylus ID
- Date: Tue, 31 Jan 2012 16:06:55 +0000 (UTC)
commit 4c3529857413973e7a6c9deb325f88eb50467ff3
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 31 16:00:23 2012 +0000
common: Return -1 on error getting the stylus ID
Rather than 0x0, so we can differentiate the lack of stylus ID to
an erro getting the stylus ID.
plugins/common/gsd-input-helper.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/common/gsd-input-helper.c b/plugins/common/gsd-input-helper.c
index 4c14657..630fdde 100644
--- a/plugins/common/gsd-input-helper.c
+++ b/plugins/common/gsd-input-helper.c
@@ -302,13 +302,13 @@ xdevice_get_last_tool_id (int deviceid)
unsigned char *data, *ptr;
int id;
- id = 0x0;
+ id = -1;
gdk_display_sync (gdk_display_get_default ());
prop = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), WACOM_SERIAL_IDS_PROP, False);
if (!prop)
- return id;
+ return -1;
gdk_error_trap_push ();
@@ -317,7 +317,7 @@ xdevice_get_last_tool_id (int deviceid)
AnyPropertyType, &act_type, &act_format,
&nitems, &bytes_after, &data) == Success) {
gdk_error_trap_pop_ignored ();
- return 0x0;
+ return -1;
}
if (gdk_error_trap_pop ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]