[gnome-settings-daemon] common: Make test program print the tool ID
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] common: Make test program print the tool ID
- Date: Tue, 31 Jan 2012 16:07:05 +0000 (UTC)
commit 3342e410ce10fadfa69271d62fd07224a2e0570d
Author: Bastien Nocera <hadess hadess net>
Date: Tue Jan 31 16:06:31 2012 +0000
common: Make test program print the tool ID
plugins/common/test-input-helper.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/plugins/common/test-input-helper.c b/plugins/common/test-input-helper.c
index d7770b0..4a9cccf 100644
--- a/plugins/common/test-input-helper.c
+++ b/plugins/common/test-input-helper.c
@@ -105,8 +105,15 @@ int main (int argc, char **argv)
if (device_is_touchpad (device))
g_print ("Device %d is touchpad:\t\t%s\n", (int) device_info[i].id, "yes");
- else
- g_print ("Device %d is touchpad/touchscreen:\t%s\n", (int) device_info[i].id, "no");
+ else {
+ int tool_id;
+
+ tool_id = xdevice_get_last_tool_id (device_info[i].id);
+ if (tool_id >= 0x0)
+ g_print ("Device %d is touchpad/touchscreen:\t%s (tool ID: 0x%x)\n", (int) device_info[i].id, "no", tool_id);
+ else
+ g_print ("Device %d is touchpad/touchscreen:\t%s\n", (int) device_info[i].id, "no");
+ }
XCloseDevice (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), device);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]