From 65354e5a698a5b527db09afc431110afba0e14b2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 20 Aug 2009 10:52:52 +1000 Subject: [PATCH] Xi: return BadDevice for changing device cursors on non-master pointers. Signed-off-by: Peter Hutterer --- Xi/xichangecursor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c index dc33d70a1..ea5bdeb93 100644 --- a/Xi/xichangecursor.c +++ b/Xi/xichangecursor.c @@ -78,6 +78,9 @@ int ProcXIChangeCursor(ClientPtr client) if (rc != Success) return rc; + if (!IsMaster(pDev) || !IsPointerDevice(pDev)) + return BadDevice; + if (stuff->win != None) { rc = dixLookupWindow(&pWin, stuff->win, client, DixSetAttrAccess);