From 9f3c5d46f81887b2b413b3e6cc9df8282f06522c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 2 Feb 2009 12:55:39 +1000 Subject: [PATCH] Xi: initialize the device before applying button map changes. This part got lost in bc909f71367a0. Reported by Tomas Carnecky. Acked-by: Daniel Stone Signed-off-by: Peter Hutterer --- Xi/setbmap.c | 4 ++++ 1 file changed, 4 insertions(+) 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;