Input: Return errors to the dispatcher instead of sending them ourself.

Also fixed two "unused variable: stuff" warnings.
This commit is contained in:
Eamon Walsh
2007-09-24 13:33:01 -04:00
committed by Eamon Walsh
parent 56ffc381d3
commit 31a7994ac7
35 changed files with 267 additions and 652 deletions

View File

@@ -56,13 +56,10 @@ SOFTWARE.
#include <dix-config.h>
#endif
#include <X11/X.h> /* for inputstr.h */
#include <X11/Xproto.h> /* Request macro */
#include "windowstr.h" /* focus struct */
#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "extnsionst.h"
#include "extinit.h" /* LookupDeviceIntRec */
#include "exglobals.h"
@@ -101,10 +98,8 @@ ProcXGetDeviceFocus(ClientPtr client)
REQUEST_SIZE_MATCH(xGetDeviceFocusReq);
dev = LookupDeviceIntRec(stuff->deviceid);
if (dev == NULL || !dev->focus) {
SendErrorToClient(client, IReqCode, X_GetDeviceFocus, 0, BadDevice);
return Success;
}
if (dev == NULL || !dev->focus)
return BadDevice;
rep.repType = X_Reply;
rep.RepType = X_GetDeviceFocus;