summaryrefslogtreecommitdiff
path: root/Xi/xiwarppointer.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-09-03 10:00:00 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-09-03 10:00:34 +1000
commit61a6e1f074d9ff75d61446b946aab6c04019c287 (patch)
tree13d6d9af500de11e3456921dfd32e89e2457cb82 /Xi/xiwarppointer.c
parent8939ad2b2aa0385f072d3e1169eaf99289ed737a (diff)
Xi: return BadDevice for master kbds and attached slaves in XIWarpPointer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi/xiwarppointer.c')
-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);