Blame SOURCES/0001-wacom-Pick-libwacom-s-Generic-Pen-stylus-if-tool-ID-.patch
|
|
9b746a |
From 520411840b6cd1b9b72e4a2fd19701aad7145f4f Mon Sep 17 00:00:00 2001
|
|
|
9b746a |
From: Carlos Garnacho <carlosg@gnome.org>
|
|
|
9b746a |
Date: Thu, 13 Feb 2020 20:28:29 +0100
|
|
|
9b746a |
Subject: [PATCH] wacom: Pick libwacom's Generic Pen stylus if tool ID is 0
|
|
|
9b746a |
|
|
|
9b746a |
We generally use tool ID 0 if the ID is actually unknown, libwacom however
|
|
|
9b746a |
assigns 0xfffff to such device. Make it sure we find the "Generic Pen"
|
|
|
9b746a |
stylus description in that case.
|
|
|
9b746a |
---
|
|
|
9b746a |
panels/wacom/cc-wacom-tool.c | 5 ++++-
|
|
|
9b746a |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
9b746a |
|
|
|
9b746a |
diff --git a/panels/wacom/cc-wacom-tool.c b/panels/wacom/cc-wacom-tool.c
|
|
|
9b746a |
index 1316fa5d6..d54de6160 100644
|
|
|
9b746a |
--- a/panels/wacom/cc-wacom-tool.c
|
|
|
9b746a |
+++ b/panels/wacom/cc-wacom-tool.c
|
|
|
9b746a |
@@ -165,7 +165,10 @@ cc_wacom_tool_initable_init (GInitable *initable,
|
|
|
9b746a |
tool->id = ids[0];
|
|
|
9b746a |
}
|
|
|
9b746a |
|
|
|
9b746a |
- tool->wstylus = libwacom_stylus_get_for_id (wacom_db, tool->id);
|
|
|
9b746a |
+ if (tool->id == 0)
|
|
|
9b746a |
+ tool->wstylus = libwacom_stylus_get_for_id (wacom_db, 0xfffff);
|
|
|
9b746a |
+ else
|
|
|
9b746a |
+ tool->wstylus = libwacom_stylus_get_for_id (wacom_db, tool->id);
|
|
|
9b746a |
|
|
|
9b746a |
if (!tool->wstylus) {
|
|
|
9b746a |
g_set_error (error, 0, 0, "Stylus description not found");
|
|
|
9b746a |
--
|
|
|
9b746a |
2.25.0
|
|
|
9b746a |
|