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