summaryrefslogtreecommitdiff
path: root/Xi/setbmap.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-02-02 12:55:39 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-02-03 11:12:01 +1000
commit9f3c5d46f81887b2b413b3e6cc9df8282f06522c (patch)
treee5c76f3bf4d36c80d6b36d75e24b944c1ce1374e /Xi/setbmap.c
parent6bf6a4c47e94780bf0eef47702f21a505c336556 (diff)
Xi: initialize the device before applying button map changes.
This part got lost in bc909f71367a0. Reported by Tomas Carnecky. Acked-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi/setbmap.c')
-rw-r--r--Xi/setbmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index b6f62dddb..f29389d45 100644
--- a/Xi/setbmap.c
+++ b/Xi/setbmap.c
@@ -101,6 +101,10 @@ ProcXSetDeviceButtonMapping(ClientPtr client)
stuff->map_length + 3) >> 2)
return BadLength;
+ ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
+ if (ret != Success)
+ return ret;
+
rep.repType = X_Reply;
rep.RepType = X_SetDeviceButtonMapping;
rep.length = 0;