diff options
author | Jason Gerecke <killertofu@gmail.com> | 2012-11-14 09:54:34 -0800 |
---|---|---|
committer | Jason Gerecke <killertofu@gmail.com> | 2012-12-04 09:16:57 -0800 |
commit | 26a6a42fd0a726518f62b8da6926b111a01b33cf (patch) | |
tree | 48bc99d61c49380bff937d2fd7926ccb44baacab /src/wcmXCommand.c | |
parent | 5899942e84d4ae7498ea0cc764aa05b609738d7f (diff) | |
download | xf86-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.c | 2 |
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; |