summaryrefslogtreecommitdiff
path: root/Xi/setbmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xi/setbmap.c')
-rw-r--r--Xi/setbmap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Xi/setbmap.c b/Xi/setbmap.c
index 40f0f9a99..3035c649e 100644
--- a/Xi/setbmap.c
+++ b/Xi/setbmap.c
@@ -63,7 +63,6 @@ SOFTWARE.
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exevents.h"
-#include "extinit.h" /* LookupDeviceIntRec */
#include "exglobals.h"
#include "setbmap.h"
@@ -110,9 +109,9 @@ ProcXSetDeviceButtonMapping(ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.status = MappingSuccess;
- dev = LookupDeviceIntRec(stuff->deviceid);
- if (dev == NULL)
- return BadDevice;
+ ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess);
+ if (ret != Success)
+ return ret;
ret = SetButtonMapping(client, dev, stuff->map_length, (BYTE *) & stuff[1]);