From 4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 25 Jul 2009 19:39:46 +0000 Subject: Added xorg-server-1.6.2.tar.gz --- xorg-server/Xi/opendev.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xorg-server/Xi/opendev.c') diff --git a/xorg-server/Xi/opendev.c b/xorg-server/Xi/opendev.c index acda38530..8d249278d 100644 --- a/xorg-server/Xi/opendev.c +++ b/xorg-server/Xi/opendev.c @@ -62,6 +62,7 @@ SOFTWARE. #include "XIstubs.h" #include "windowstr.h" /* window structure */ #include "exglobals.h" +#include "exevents.h" #include "opendev.h" @@ -102,11 +103,8 @@ ProcXOpenDevice(ClientPtr client) REQUEST(xOpenDeviceReq); REQUEST_SIZE_MATCH(xOpenDeviceReq); - if (stuff->deviceid == inputInfo.pointer->id || - stuff->deviceid == inputInfo.keyboard->id) - return BadDevice; - status = dixLookupDevice(&dev, stuff->deviceid, client, DixUseAccess); + if (status == BadDevice) { /* not open */ for (dev = inputInfo.off_devices; dev; dev = dev->next) if (dev->id == stuff->deviceid) @@ -116,6 +114,9 @@ ProcXOpenDevice(ClientPtr client) } else if (status != Success) return status; + if (dev->isMaster) + return BadDevice; + OpenInputDevice(dev, client, &status); if (status != Success) return status; -- cgit v1.2.3