Peter Hutterer
2016-05-25 05:51:23 UTC
Signed-off-by: Peter Hutterer <***@who-t.net>
---
tools/generate-udev-rules.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/generate-udev-rules.c b/tools/generate-udev-rules.c
index 87d43fe..353bf6d 100644
--- a/tools/generate-udev-rules.c
+++ b/tools/generate-udev-rules.c
@@ -102,8 +102,9 @@ static void print_udev_entry_matchstr(WacomDevice *device, const char *matchstr)
printf( "ATTRS{name}==\"* Finger\", %s ENV{%s}=\"1\"\n", matchstr, touchtype);
}
- /* set ID_INPUT_TABLET_PAD for pads */
- if (libwacom_get_num_buttons (device) > 0)
+ if (libwacom_get_class (device) == WCLASS_REMOTE)
+ printf ("%s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr);
+ else if (libwacom_get_num_buttons (device) > 0)
printf ("ATTRS{name}==\"* Pad\", %s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr);
}
---
tools/generate-udev-rules.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/generate-udev-rules.c b/tools/generate-udev-rules.c
index 87d43fe..353bf6d 100644
--- a/tools/generate-udev-rules.c
+++ b/tools/generate-udev-rules.c
@@ -102,8 +102,9 @@ static void print_udev_entry_matchstr(WacomDevice *device, const char *matchstr)
printf( "ATTRS{name}==\"* Finger\", %s ENV{%s}=\"1\"\n", matchstr, touchtype);
}
- /* set ID_INPUT_TABLET_PAD for pads */
- if (libwacom_get_num_buttons (device) > 0)
+ if (libwacom_get_class (device) == WCLASS_REMOTE)
+ printf ("%s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr);
+ else if (libwacom_get_num_buttons (device) > 0)
printf ("ATTRS{name}==\"* Pad\", %s ENV{ID_INPUT_TABLET_PAD}=\"1\"\n", matchstr);
}
--
2.7.4
2.7.4