summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xi/xiwarppointer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c
index 88ba9fa66..7276e6faf 100644
--- a/Xi/xiwarppointer.c
+++ b/Xi/xiwarppointer.c
@@ -97,6 +97,13 @@ ProcXIWarpPointer(ClientPtr client)
return rc;
}
+ if ((!IsMaster(pDev) && pDev->u.master) ||
+ (IsMaster(pDev) && !IsPointerDevice(pDev)))
+ {
+ client->errorValue = stuff->deviceid;
+ return BadDevice;
+ }
+
if (stuff->dst_win != None)
{
rc = dixLookupWindow(&dest, stuff->dst_win, client, DixGetAttrAccess);