[gnome-control-center/rhel/8.4.0: 22/32] wacom: Pick libwacom's Generic Pen stylus if tool ID is 0
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/rhel/8.4.0: 22/32] wacom: Pick libwacom's Generic Pen stylus if tool ID is 0
- Date: Tue, 13 Apr 2021 14:34:54 +0000 (UTC)
commit 20c50328b40ae38730d03621f27239cd4c7fec7f
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Feb 13 20:28:29 2020 +0100
wacom: Pick libwacom's Generic Pen stylus if tool ID is 0
We generally use tool ID 0 if the ID is actually unknown, libwacom however
assigns 0xfffff to such device. Make it sure we find the "Generic Pen"
stylus description in that case.
panels/wacom/cc-wacom-tool.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/panels/wacom/cc-wacom-tool.c b/panels/wacom/cc-wacom-tool.c
index fa1169fbd..4ce3fb035 100644
--- a/panels/wacom/cc-wacom-tool.c
+++ b/panels/wacom/cc-wacom-tool.c
@@ -166,7 +166,10 @@ cc_wacom_tool_initable_init (GInitable *initable,
tool->id = ids[0];
}
- tool->wstylus = libwacom_stylus_get_for_id (wacom_db, tool->id);
+ if (tool->id == 0)
+ tool->wstylus = libwacom_stylus_get_for_id (wacom_db, 0xfffff);
+ else
+ tool->wstylus = libwacom_stylus_get_for_id (wacom_db, tool->id);
if (!tool->wstylus) {
g_set_error (error, 0, 0, "Stylus description not found");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]