aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/opendev.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 19:39:46 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 19:39:46 +0000
commit4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (patch)
treec1e02b9d3509aa97703aa4b540d4cd22ec4600ed /xorg-server/Xi/opendev.c
parentdc3c299dd0995549e2a6973ca0f25b254afd38a5 (diff)
downloadvcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.gz
vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.bz2
vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.zip
Added xorg-server-1.6.2.tar.gz
Diffstat (limited to 'xorg-server/Xi/opendev.c')
-rw-r--r--xorg-server/Xi/opendev.c9
1 files changed, 5 insertions, 4 deletions
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;