summaryrefslogtreecommitdiff
path: root/src/wcmXCommand.c
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2012-11-14 09:54:34 -0800
committerJason Gerecke <killertofu@gmail.com>2012-12-04 09:16:57 -0800
commit26a6a42fd0a726518f62b8da6926b111a01b33cf (patch)
tree48bc99d61c49380bff937d2fd7926ccb44baacab /src/wcmXCommand.c
parent5899942e84d4ae7498ea0cc764aa05b609738d7f (diff)
downloadxf86-input-wacom-26a6a42fd0a726518f62b8da6926b111a01b33cf.tar.gz
Properly clear action properties
What we want to do is clear all 256 steps of an individual action. What we were doing was clearing just the first step. As mentioned on the ArchWiki, this cuases the following behavior: $ xsetwacom --set <id> Button 1 "key a b c" # press button 1 -> abc $ xsetwacom --set <id> Button 1 "key d" # press button 1 -> dbc WRONG! Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/wcmXCommand.c')
-rw-r--r--src/wcmXCommand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index d53df08..922c80f 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -433,7 +433,7 @@ static int wcmSetActionProperty(DeviceIntPtr dev, Atom property,
if (!checkonly && prop)
{
- memset(action, 0, sizeof(action));
+ memset(action, 0, sizeof(*action));
for (i = 0; i < prop->size; i++)
(*action)[i] = ((unsigned int*)prop->data)[i];
*handler = property;