[PATCH] Xi: initialize the device before applying button map changes.

Peter Hutterer peter.hutterer at who-t.net
Sun Feb 1 18:55:39 PST 2009


This part got lost in bc909f71367a0.
Reported by Tomas Carnecky.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 Xi/setbmap.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index b6f62dd..f29389d 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;
-- 
1.6.0.6



More information about the xorg mailing list