diff options
Diffstat (limited to 'Xi/xisetdevfocus.c')
-rw-r--r-- | Xi/xisetdevfocus.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Xi/xisetdevfocus.c b/Xi/xisetdevfocus.c index 32f7e597b..cd1f6a622 100644 --- a/Xi/xisetdevfocus.c +++ b/Xi/xisetdevfocus.c @@ -75,6 +75,12 @@ ProcXISetFocus(ClientPtr client) REQUEST(xXISetFocusReq); REQUEST_AT_LEAST_SIZE(xXISetFocusReq); + if (stuff->deviceid > 0xFF) /* FIXME */ + { + client->errorValue = stuff->deviceid; + return BadImplementation; + } + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetFocusAccess); if (ret != Success) return ret; @@ -95,6 +101,12 @@ ProcXIGetFocus(ClientPtr client) REQUEST(xXIGetFocusReq); REQUEST_AT_LEAST_SIZE(xXIGetFocusReq); + if (stuff->deviceid > 0xFF) /* FIXME */ + { + client->errorValue = stuff->deviceid; + return BadImplementation; + } + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess); if (ret != Success) return ret; |