xace: add hooks + new access codes: XKB extension.
Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of inputInfo.keyboard and inputInfo.pointer, respectively; all use cases are non-XI compliant anyway.
This commit is contained in:
parent
5c03d13181
commit
8b54865720
|
@ -52,7 +52,7 @@ SOFTWARE.
|
|||
#define NEED_REPLIES
|
||||
#define NEED_EVENTS
|
||||
#include <X11/X.h> /* From library include environment */
|
||||
#include "input.h" /* From server include env. (must be before Xlib.h!) */
|
||||
#include "inputstr.h" /* From server include env. (must be before Xlib.h!) */
|
||||
#ifdef PC
|
||||
# include "scrintst.h" /* Screen struct */
|
||||
# include "extnsist.h"
|
||||
|
@ -96,8 +96,8 @@ int XETrapSimulateXEvent(register xXTrapInputReq *request,
|
|||
xEvent xev;
|
||||
register int x = request->input.x;
|
||||
register int y = request->input.y;
|
||||
DevicePtr keydev = LookupKeyboardDevice();
|
||||
DevicePtr ptrdev = LookupPointerDevice();
|
||||
DevicePtr keydev = (DevicePtr)inputInfo.keyboard;
|
||||
DevicePtr ptrdev = (DevicePtr)inputInfo.pointer;
|
||||
|
||||
if (request->input.screen < screenInfo.numScreens)
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <X11/Xos.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include "input.h" /* Server DevicePtr definitions */
|
||||
#include "inputstr.h" /* Server DevicePtr definitions */
|
||||
#include "misc.h" /* Server swapping macros */
|
||||
#include "dixstruct.h" /* Server ClientRec definitions */
|
||||
#include "resource.h" /* Used with the MakeAtom call */
|
||||
|
@ -277,7 +277,7 @@ Bool XETrapRedirectDevices()
|
|||
/* Do we need to redirect the keyboard device? */
|
||||
if (XETrapKbdDev == NULL)
|
||||
{
|
||||
if ((XETrapKbdDev = LookupKeyboardDevice()) == NULL)
|
||||
if ((XETrapKbdDev = (DevicePtr)inputInfo.keyboard) == NULL)
|
||||
{
|
||||
retval = False;
|
||||
}
|
||||
|
@ -302,7 +302,7 @@ Bool XETrapRedirectDevices()
|
|||
#ifndef VECTORED_EVENTS
|
||||
if (XETrapPtrDev == NULL)
|
||||
{
|
||||
if ((XETrapPtrDev = LookupPointerDevice()) == 0L)
|
||||
if ((XETrapPtrDev = (DevicePtr)inputInfo.pointer) == 0L)
|
||||
{
|
||||
retval = False;
|
||||
}
|
||||
|
|
|
@ -316,7 +316,7 @@ ProcXTestFakeInput(client)
|
|||
#ifdef XINPUT
|
||||
if (!extension)
|
||||
#endif /* XINPUT */
|
||||
dev = (DeviceIntPtr)LookupKeyboardDevice();
|
||||
dev = inputInfo.keyboard;
|
||||
if (ev->u.u.detail < dev->key->curKeySyms.minKeyCode ||
|
||||
ev->u.u.detail > dev->key->curKeySyms.maxKeyCode)
|
||||
{
|
||||
|
@ -360,7 +360,7 @@ ProcXTestFakeInput(client)
|
|||
break;
|
||||
}
|
||||
#endif /* XINPUT */
|
||||
dev = (DeviceIntPtr)LookupPointerDevice();
|
||||
dev = inputInfo.pointer;
|
||||
if (ev->u.keyButtonPointer.root == None)
|
||||
root = GetCurrentRootWindow();
|
||||
else
|
||||
|
@ -449,7 +449,7 @@ ProcXTestFakeInput(client)
|
|||
#ifdef XINPUT
|
||||
if (!extension)
|
||||
#endif /* XINPUT */
|
||||
dev = (DeviceIntPtr)LookupPointerDevice();
|
||||
dev = inputInfo.pointer;
|
||||
if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons)
|
||||
{
|
||||
client->errorValue = ev->u.u.detail;
|
||||
|
|
|
@ -62,6 +62,7 @@ SOFTWARE.
|
|||
#include <X11/extensions/XIproto.h>
|
||||
#include "exevents.h"
|
||||
#include "exglobals.h"
|
||||
#include "xace.h"
|
||||
|
||||
#include "grabdev.h"
|
||||
#include "grabdevb.h"
|
||||
|
@ -127,8 +128,12 @@ ProcXGrabDeviceButton(ClientPtr client)
|
|||
return ret;
|
||||
if (mdev->key == NULL)
|
||||
return BadMatch;
|
||||
} else
|
||||
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
||||
} else {
|
||||
mdev = inputInfo.keyboard;
|
||||
ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixReadAccess);
|
||||
if (ret != Success)
|
||||
return ret;
|
||||
}
|
||||
|
||||
class = (XEventClass *) (&stuff[1]); /* first word of values */
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ SOFTWARE.
|
|||
#include <X11/extensions/XIproto.h>
|
||||
#include "exevents.h"
|
||||
#include "exglobals.h"
|
||||
#include "xace.h"
|
||||
|
||||
#include "grabdev.h"
|
||||
#include "grabdevk.h"
|
||||
|
@ -125,8 +126,12 @@ ProcXGrabDeviceKey(ClientPtr client)
|
|||
return ret;
|
||||
if (mdev->key == NULL)
|
||||
return BadMatch;
|
||||
} else
|
||||
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
||||
} else {
|
||||
mdev = inputInfo.keyboard;
|
||||
ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixReadAccess);
|
||||
if (ret != Success)
|
||||
return ret;
|
||||
}
|
||||
|
||||
class = (XEventClass *) (&stuff[1]); /* first word of values */
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ ProcXUngrabDeviceButton(ClientPtr client)
|
|||
if (mdev->key == NULL)
|
||||
return BadMatch;
|
||||
} else
|
||||
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
||||
mdev = inputInfo.keyboard;
|
||||
|
||||
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess);
|
||||
if (rc != Success)
|
||||
|
|
|
@ -120,7 +120,7 @@ ProcXUngrabDeviceKey(ClientPtr client)
|
|||
if (mdev->key == NULL)
|
||||
return BadMatch;
|
||||
} else
|
||||
mdev = (DeviceIntPtr) LookupKeyboardDevice();
|
||||
mdev = inputInfo.keyboard;
|
||||
|
||||
rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess);
|
||||
if (rc != Success)
|
||||
|
|
|
@ -705,18 +705,6 @@ RegisterKeyboardDevice(DeviceIntPtr device)
|
|||
RegisterOtherDevice(device);
|
||||
}
|
||||
|
||||
_X_EXPORT DevicePtr
|
||||
LookupKeyboardDevice(void)
|
||||
{
|
||||
return inputInfo.keyboard ? &inputInfo.keyboard->public : NULL;
|
||||
}
|
||||
|
||||
_X_EXPORT DevicePtr
|
||||
LookupPointerDevice(void)
|
||||
{
|
||||
return inputInfo.pointer ? &inputInfo.pointer->public : NULL;
|
||||
}
|
||||
|
||||
int
|
||||
dixLookupDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode)
|
||||
{
|
||||
|
|
|
@ -691,7 +691,7 @@ ephyrUpdateModifierState(unsigned int state)
|
|||
int i;
|
||||
CARD8 mask;
|
||||
|
||||
pkeydev = (DeviceIntPtr)LookupKeyboardDevice();
|
||||
pkeydev = inputInfo.keyboard;
|
||||
|
||||
if (!pkeydev)
|
||||
return;
|
||||
|
|
|
@ -232,7 +232,7 @@ VxWorksKeyboardRead (int fd)
|
|||
void
|
||||
VxWorksKeyboardLeds (int leds)
|
||||
{
|
||||
DeviceIntPtr pKeyboard = (DeviceIntPtr) LookupKeyboardDevice ();
|
||||
DeviceIntPtr pKeyboard = inputInfo.keyboard;
|
||||
KeyboardCtrl *ctrl = &pKeyboard->kbdfeed->ctrl;
|
||||
led_ioctl_info led_info;
|
||||
int i;
|
||||
|
|
|
@ -139,8 +139,6 @@ _X_HIDDEN void *dixLookupTab[] = {
|
|||
SYMFUNC(InitKeyboardDeviceStruct)
|
||||
SYMFUNC(SendMappingNotify)
|
||||
SYMFUNC(InitPointerDeviceStruct)
|
||||
SYMFUNC(LookupKeyboardDevice)
|
||||
SYMFUNC(LookupPointerDevice)
|
||||
/* dispatch.c */
|
||||
SYMFUNC(SetInputCheck)
|
||||
SYMFUNC(SendErrorToClient)
|
||||
|
|
|
@ -439,7 +439,7 @@ KdKeybdProc(DeviceIntPtr pDevice, int onoff)
|
|||
switch (onoff)
|
||||
{
|
||||
case DEVICE_INIT:
|
||||
if (pDev != LookupKeyboardDevice())
|
||||
if (pDev != (DevicePtr)inputInfo.keyboard)
|
||||
{
|
||||
return !Success;
|
||||
}
|
||||
|
|
|
@ -1100,7 +1100,7 @@ xglxKeybdProc (DeviceIntPtr pDevice,
|
|||
int xkbOp, xkbEvent, xkbError, xkbMajor, xkbMinor;
|
||||
#endif
|
||||
|
||||
if (pDev != LookupKeyboardDevice ())
|
||||
if (pDev != (DevicePtr)inputInfo.keyboard)
|
||||
return !Success;
|
||||
|
||||
xmodMap = XGetModifierMapping (xdisplay);
|
||||
|
|
|
@ -224,7 +224,7 @@ xglKeybdProc (DeviceIntPtr pDevice,
|
|||
|
||||
switch (onoff) {
|
||||
case DEVICE_INIT:
|
||||
if (pDev != LookupKeyboardDevice ())
|
||||
if (pDev != (DevicePtr)inputInfo.keyboard)
|
||||
return !Success;
|
||||
|
||||
ret = InitKeyboardDeviceStruct (pDev,
|
||||
|
|
|
@ -197,10 +197,6 @@ extern void RegisterPointerDevice(
|
|||
extern void RegisterKeyboardDevice(
|
||||
DeviceIntPtr /*device*/);
|
||||
|
||||
extern DevicePtr LookupKeyboardDevice(void);
|
||||
|
||||
extern DevicePtr LookupPointerDevice(void);
|
||||
|
||||
extern int dixLookupDevice(
|
||||
DeviceIntPtr * /* dev */,
|
||||
int /* id */,
|
||||
|
|
|
@ -262,6 +262,7 @@ typedef struct
|
|||
extern int XkbReqCode;
|
||||
extern int XkbEventBase;
|
||||
extern int XkbDisableLockActions;
|
||||
extern int XkbKeyboardErrorCode;
|
||||
extern char * XkbBaseDirectory;
|
||||
extern char * XkbBinDirectory;
|
||||
extern char * XkbInitialMap;
|
||||
|
@ -352,29 +353,44 @@ extern void XkbFreeNames(
|
|||
Bool /* freeMap */
|
||||
);
|
||||
|
||||
extern DeviceIntPtr _XkbLookupAnyDevice(
|
||||
int /* id */,
|
||||
int * /* why_rtrn */
|
||||
extern int _XkbLookupAnyDevice(
|
||||
DeviceIntPtr *pDev,
|
||||
int id,
|
||||
ClientPtr client,
|
||||
Mask access_mode,
|
||||
int *xkb_err
|
||||
);
|
||||
|
||||
extern DeviceIntPtr _XkbLookupKeyboard(
|
||||
int /* id */,
|
||||
int * /* why_rtrn */
|
||||
extern int _XkbLookupKeyboard(
|
||||
DeviceIntPtr *pDev,
|
||||
int id,
|
||||
ClientPtr client,
|
||||
Mask access_mode,
|
||||
int *xkb_err
|
||||
);
|
||||
|
||||
extern DeviceIntPtr _XkbLookupBellDevice(
|
||||
int /* id */,
|
||||
int * /* why_rtrn */
|
||||
extern int _XkbLookupBellDevice(
|
||||
DeviceIntPtr *pDev,
|
||||
int id,
|
||||
ClientPtr client,
|
||||
Mask access_mode,
|
||||
int *xkb_err
|
||||
);
|
||||
|
||||
extern DeviceIntPtr _XkbLookupLedDevice(
|
||||
int /* id */,
|
||||
int * /* why_rtrn */
|
||||
extern int _XkbLookupLedDevice(
|
||||
DeviceIntPtr *pDev,
|
||||
int id,
|
||||
ClientPtr client,
|
||||
Mask access_mode,
|
||||
int *xkb_err
|
||||
);
|
||||
|
||||
extern DeviceIntPtr _XkbLookupButtonDevice(
|
||||
int /* id */,
|
||||
int * /* why_rtrn */
|
||||
extern int _XkbLookupButtonDevice(
|
||||
DeviceIntPtr *pDev,
|
||||
int id,
|
||||
ClientPtr client,
|
||||
Mask access_mode,
|
||||
int *xkb_err
|
||||
);
|
||||
|
||||
extern XkbDescPtr XkbAllocKeyboard(
|
||||
|
|
|
@ -53,7 +53,7 @@ deviceValuator * val;
|
|||
int x,y;
|
||||
int nAxes, i, count;
|
||||
|
||||
if ((dev==(DeviceIntPtr)LookupPointerDevice())||(!dev->public.on))
|
||||
if (dev == inputInfo.pointer || !dev->public.on)
|
||||
return;
|
||||
|
||||
nAxes = (dev->valuator?dev->valuator->numAxes:0);
|
||||
|
|
|
@ -46,7 +46,7 @@ xEvent ev;
|
|||
int x,y;
|
||||
DevicePtr ptr;
|
||||
|
||||
if ((ptr = LookupPointerDevice())==NULL)
|
||||
if ((ptr = (DevicePtr)inputInfo.pointer)==NULL)
|
||||
return;
|
||||
GetSpritePosition(&x,&y);
|
||||
ev.u.u.type = event;
|
||||
|
|
101
xkb/xkb.c
101
xkb/xkb.c
|
@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#define XKBSRV_NEED_FILE_FUNCS
|
||||
#include <xkbsrv.h>
|
||||
#include "extnsionst.h"
|
||||
#include "xace.h"
|
||||
#include "xkb.h"
|
||||
|
||||
#include <X11/extensions/XI.h>
|
||||
|
@ -45,7 +46,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
int XkbEventBase;
|
||||
static int XkbErrorBase;
|
||||
int XkbReqCode;
|
||||
static int XkbKeyboardErrorCode;
|
||||
int XkbKeyboardErrorCode;
|
||||
CARD32 xkbDebugFlags = 0;
|
||||
static CARD32 xkbDebugCtrls = 0;
|
||||
|
||||
|
@ -53,19 +54,23 @@ static RESTYPE RT_XKBCLIENT;
|
|||
|
||||
/***====================================================================***/
|
||||
|
||||
#define CHK_DEVICE(d,sp,lf) {\
|
||||
#define CHK_DEVICE(dev, id, client, access_mode, lf) {\
|
||||
int why;\
|
||||
d = (DeviceIntPtr)lf((sp),&why);\
|
||||
if (!dev) {\
|
||||
client->errorValue = _XkbErrCode2(why,(sp));\
|
||||
return XkbKeyboardErrorCode;\
|
||||
int rc = lf(&(dev), id, client, access_mode, &why);\
|
||||
if (rc != Success) {\
|
||||
client->errorValue = _XkbErrCode2(why, id);\
|
||||
return rc;\
|
||||
}\
|
||||
}
|
||||
|
||||
#define CHK_KBD_DEVICE(d,sp) CHK_DEVICE(d,sp,_XkbLookupKeyboard)
|
||||
#define CHK_LED_DEVICE(d,sp) CHK_DEVICE(d,sp,_XkbLookupLedDevice)
|
||||
#define CHK_BELL_DEVICE(d,sp) CHK_DEVICE(d,sp,_XkbLookupBellDevice)
|
||||
#define CHK_ANY_DEVICE(d,sp) CHK_DEVICE(d,sp,_XkbLookupAnyDevice)
|
||||
#define CHK_KBD_DEVICE(dev, id, client, mode) \
|
||||
CHK_DEVICE(dev, id, client, mode, _XkbLookupKeyboard)
|
||||
#define CHK_LED_DEVICE(dev, id, client, mode) \
|
||||
CHK_DEVICE(dev, id, client, mode, _XkbLookupLedDevice)
|
||||
#define CHK_BELL_DEVICE(dev, id, client, mode) \
|
||||
CHK_DEVICE(dev, id, client, mode, _XkbLookupBellDevice)
|
||||
#define CHK_ANY_DEVICE(dev, id, client, mode) \
|
||||
CHK_DEVICE(dev, id, client, mode, _XkbLookupAnyDevice)
|
||||
|
||||
#define CHK_ATOM_ONLY2(a,ev,er) {\
|
||||
if (((a)==None)||(!ValidAtom((a)))) {\
|
||||
|
@ -206,7 +211,7 @@ ProcXkbSelectEvents(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_ANY_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
|
||||
|
||||
if (((stuff->affectWhich&XkbMapNotifyMask)!=0)&&(stuff->affectMap)) {
|
||||
client->mapNotifyMask&= ~stuff->affectMap;
|
||||
|
@ -351,7 +356,7 @@ ProcXkbBell(ClientPtr client)
|
|||
REQUEST(xkbBellReq);
|
||||
DeviceIntPtr dev;
|
||||
WindowPtr pWin;
|
||||
int base;
|
||||
int rc, base;
|
||||
int newPercent,oldPitch,oldDuration;
|
||||
pointer ctrl;
|
||||
|
||||
|
@ -360,7 +365,7 @@ ProcXkbBell(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_BELL_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_BELL_DEVICE(dev, stuff->deviceSpec, client, DixBellAccess);
|
||||
CHK_ATOM_OR_NONE(stuff->name);
|
||||
|
||||
if ((stuff->forceSound)&&(stuff->eventOnly)) {
|
||||
|
@ -448,10 +453,10 @@ ProcXkbBell(ClientPtr client)
|
|||
return BadValue;
|
||||
}
|
||||
if (stuff->window!=None) {
|
||||
pWin= (WindowPtr)LookupIDByType(stuff->window,RT_WINDOW);
|
||||
if (pWin==NULL) {
|
||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||
if (rc != Success) {
|
||||
client->errorValue= stuff->window;
|
||||
return BadValue;
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
else pWin= NULL;
|
||||
|
@ -499,7 +504,7 @@ ProcXkbGetState(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
|
||||
|
||||
xkb= &dev->key->xkbInfo->state;
|
||||
bzero(&rep,sizeof(xkbGetStateReply));
|
||||
|
@ -544,7 +549,7 @@ ProcXkbLatchLockState(ClientPtr client)
|
|||
if (!(client->xkbClientFlags & _XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
|
||||
CHK_MASK_MATCH(0x01, stuff->affectModLocks, stuff->modLocks);
|
||||
CHK_MASK_MATCH(0x01, stuff->affectModLatches, stuff->modLatches);
|
||||
|
||||
|
@ -612,7 +617,7 @@ ProcXkbGetControls(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
|
||||
|
||||
xkb = dev->key->xkbInfo->desc->ctrls;
|
||||
rep.type = X_Reply;
|
||||
|
@ -689,7 +694,7 @@ ProcXkbSetControls(ClientPtr client)
|
|||
if (!(client->xkbClientFlags & _XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
|
||||
CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask);
|
||||
|
||||
for (tmpd = inputInfo.keyboard; tmpd; tmpd = tmpd->next) {
|
||||
|
@ -1370,7 +1375,7 @@ ProcXkbGetMap(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
|
||||
CHK_MASK_OVERLAP(0x01,stuff->full,stuff->partial);
|
||||
CHK_MASK_LEGAL(0x02,stuff->full,XkbAllMapComponentsMask);
|
||||
CHK_MASK_LEGAL(0x03,stuff->partial,XkbAllMapComponentsMask);
|
||||
|
@ -2299,7 +2304,7 @@ ProcXkbSetMap(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
|
||||
CHK_MASK_LEGAL(0x01,stuff->present,XkbAllMapComponentsMask);
|
||||
|
||||
XkbSetCauseXkbReq(&cause,X_kbSetMap,client);
|
||||
|
@ -2569,7 +2574,7 @@ ProcXkbGetCompatMap(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
|
||||
|
||||
xkb = dev->key->xkbInfo->desc;
|
||||
compat= xkb->compat;
|
||||
|
@ -2613,7 +2618,7 @@ ProcXkbSetCompatMap(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
|
||||
|
||||
data = (char *)&stuff[1];
|
||||
xkbi = dev->key->xkbInfo;
|
||||
|
@ -2748,7 +2753,7 @@ ProcXkbGetIndicatorState(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
|
||||
|
||||
sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,
|
||||
XkbXI_IndicatorStateMask);
|
||||
|
@ -2859,7 +2864,7 @@ XkbIndicatorPtr leds;
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
|
||||
|
||||
xkb= dev->key->xkbInfo->desc;
|
||||
leds= xkb->indicators;
|
||||
|
@ -2878,7 +2883,7 @@ int
|
|||
ProcXkbSetIndicatorMap(ClientPtr client)
|
||||
{
|
||||
register int i,bit;
|
||||
int nIndicators,why;
|
||||
int nIndicators;
|
||||
DeviceIntPtr dev;
|
||||
XkbSrvInfoPtr xkbi;
|
||||
xkbIndicatorMapWireDesc *from;
|
||||
|
@ -2891,11 +2896,8 @@ ProcXkbSetIndicatorMap(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
dev = _XkbLookupKeyboard(stuff->deviceSpec,&why);
|
||||
if (!dev) {
|
||||
client->errorValue = _XkbErrCode2(why,stuff->deviceSpec);
|
||||
return XkbKeyboardErrorCode;
|
||||
}
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
|
||||
|
||||
xkbi= dev->key->xkbInfo;
|
||||
|
||||
if (stuff->which==0)
|
||||
|
@ -2971,7 +2973,7 @@ ProcXkbGetNamedIndicator(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_LED_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess);
|
||||
CHK_ATOM_ONLY(stuff->indicator);
|
||||
|
||||
sli= XkbFindSrvLedInfo(dev,stuff->ledClass,stuff->ledID,0);
|
||||
|
@ -3057,7 +3059,7 @@ ProcXkbSetNamedIndicator(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_LED_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
|
||||
CHK_ATOM_ONLY(stuff->indicator);
|
||||
CHK_MASK_LEGAL(0x10,stuff->whichGroups,XkbIM_UseAnyGroup);
|
||||
CHK_MASK_LEGAL(0x11,stuff->whichMods,XkbIM_UseAnyMods);
|
||||
|
@ -3125,7 +3127,7 @@ ProcXkbSetNamedIndicator(ClientPtr client)
|
|||
|
||||
kbd= dev;
|
||||
if ((sli->flags&XkbSLI_HasOwnState)==0)
|
||||
kbd= (DeviceIntPtr)LookupKeyboardDevice();
|
||||
kbd = inputInfo.keyboard;
|
||||
XkbFlushLedEvents(dev,kbd,sli,&ed,&changes,&cause);
|
||||
return client->noClientException;
|
||||
}
|
||||
|
@ -3433,7 +3435,7 @@ ProcXkbGetNames(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
|
||||
CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask);
|
||||
|
||||
xkb = dev->key->xkbInfo->desc;
|
||||
|
@ -3543,7 +3545,7 @@ ProcXkbSetNames(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixUnknownAccess);
|
||||
CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask);
|
||||
|
||||
xkb = dev->key->xkbInfo->desc;
|
||||
|
@ -4379,7 +4381,7 @@ ProcXkbGetGeometry(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
|
||||
CHK_ATOM_OR_NONE(stuff->name);
|
||||
|
||||
geom= XkbLookupNamedGeometry(dev,stuff->name,&shouldFree);
|
||||
|
@ -4842,7 +4844,7 @@ ProcXkbSetGeometry(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
|
||||
CHK_ATOM_OR_NONE(stuff->name);
|
||||
|
||||
xkb= dev->key->xkbInfo->desc;
|
||||
|
@ -4897,6 +4899,7 @@ ProcXkbPerClientFlags(ClientPtr client)
|
|||
DeviceIntPtr dev;
|
||||
xkbPerClientFlagsReply rep;
|
||||
XkbInterestPtr interest;
|
||||
Mask access_mode = DixGetAttrAccess | DixSetAttrAccess;
|
||||
|
||||
REQUEST(xkbPerClientFlagsReq);
|
||||
REQUEST_SIZE_MATCH(xkbPerClientFlagsReq);
|
||||
|
@ -4904,7 +4907,7 @@ ProcXkbPerClientFlags(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
|
||||
CHK_MASK_LEGAL(0x01,stuff->change,XkbPCF_AllFlagsMask);
|
||||
CHK_MASK_MATCH(0x02,stuff->change,stuff->value);
|
||||
|
||||
|
@ -5040,7 +5043,7 @@ ProcXkbListComponents(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
|
||||
|
||||
status= Success;
|
||||
str= (unsigned char *)&stuff[1];
|
||||
|
@ -5123,6 +5126,7 @@ ProcXkbGetKbdByName(ClientPtr client)
|
|||
Bool geom_changed;
|
||||
XkbSrvLedInfoPtr old_sli;
|
||||
XkbSrvLedInfoPtr sli;
|
||||
Mask access_mode = DixGetAttrAccess | DixSetAttrAccess;
|
||||
|
||||
REQUEST(xkbGetKbdByNameReq);
|
||||
REQUEST_AT_LEAST_SIZE(xkbGetKbdByNameReq);
|
||||
|
@ -5130,7 +5134,7 @@ ProcXkbGetKbdByName(ClientPtr client)
|
|||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode);
|
||||
|
||||
xkb = dev->key->xkbInfo->desc;
|
||||
status= Success;
|
||||
|
@ -5664,7 +5668,7 @@ char * str;
|
|||
|
||||
wanted= stuff->wanted;
|
||||
|
||||
CHK_ANY_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess);
|
||||
CHK_MASK_LEGAL(0x01,wanted,XkbXI_AllDeviceFeaturesMask);
|
||||
|
||||
if ((!dev->button)||((stuff->nBtns<1)&&(!stuff->allBtns)))
|
||||
|
@ -5968,7 +5972,7 @@ DeviceIntPtr kbd;
|
|||
|
||||
kbd= dev;
|
||||
if ((sli->flags&XkbSLI_HasOwnState)==0)
|
||||
kbd= (DeviceIntPtr)LookupKeyboardDevice();
|
||||
kbd = inputInfo.keyboard;
|
||||
|
||||
XkbFlushLedEvents(dev,kbd,sli,&ed,&changes,&cause);
|
||||
ledWire= (xkbDeviceLedsWireDesc *)mapWire;
|
||||
|
@ -5993,7 +5997,7 @@ xkbExtensionDeviceNotify ed;
|
|||
|
||||
change= stuff->change;
|
||||
|
||||
CHK_ANY_DEVICE(dev,stuff->deviceSpec);
|
||||
CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess);
|
||||
CHK_MASK_LEGAL(0x01,change,XkbXI_AllFeaturesMask);
|
||||
|
||||
wire= (char *)&stuff[1];
|
||||
|
@ -6043,7 +6047,7 @@ xkbExtensionDeviceNotify ed;
|
|||
ed.nBtns= stuff->nBtns;
|
||||
|
||||
if (dev->key) kbd= dev;
|
||||
else kbd= (DeviceIntPtr)LookupKeyboardDevice();
|
||||
else kbd= inputInfo.keyboard;
|
||||
acts= &dev->button->xkb_acts[stuff->firstBtn];
|
||||
for (i=0;i<stuff->nBtns;i++,acts++) {
|
||||
if (acts->type!=XkbSA_NoAction)
|
||||
|
@ -6069,10 +6073,15 @@ ProcXkbSetDebuggingFlags(ClientPtr client)
|
|||
{
|
||||
CARD32 newFlags,newCtrls,extraLength;
|
||||
xkbSetDebuggingFlagsReply rep;
|
||||
int rc;
|
||||
|
||||
REQUEST(xkbSetDebuggingFlagsReq);
|
||||
REQUEST_AT_LEAST_SIZE(xkbSetDebuggingFlagsReq);
|
||||
|
||||
rc = XaceHook(XACE_SERVER_ACCESS, client, DixDebugAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
newFlags= xkbDebugFlags&(~stuff->affectFlags);
|
||||
newFlags|= (stuff->flags&stuff->affectFlags);
|
||||
newCtrls= xkbDebugCtrls&(~stuff->affectCtrls);
|
||||
|
|
|
@ -689,7 +689,7 @@ ProcessPointerEvent( register xEvent * xE,
|
|||
register DeviceIntPtr mouse,
|
||||
int count)
|
||||
{
|
||||
DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice();
|
||||
DeviceIntPtr dev = inputInfo.keyboard;
|
||||
XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
|
||||
unsigned changed = 0;
|
||||
|
||||
|
|
|
@ -1026,8 +1026,9 @@ DeviceIntPtr dev;
|
|||
int button;
|
||||
|
||||
if (filter->keycode==0) { /* initial press */
|
||||
dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL);
|
||||
if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice()))
|
||||
_XkbLookupButtonDevice(&dev, pAction->devbtn.device, serverClient,
|
||||
DixUnknownAccess, &button);
|
||||
if (!dev || !dev->public.on || dev == inputInfo.pointer)
|
||||
return 1;
|
||||
|
||||
button= pAction->devbtn.button;
|
||||
|
@ -1066,8 +1067,9 @@ int button;
|
|||
int button;
|
||||
|
||||
filter->active= 0;
|
||||
dev= _XkbLookupButtonDevice(filter->upAction.devbtn.device,NULL);
|
||||
if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice()))
|
||||
_XkbLookupButtonDevice(&dev, filter->upAction.devbtn.device,
|
||||
serverClient, DixUnknownAccess, &button);
|
||||
if (!dev || !dev->public.on || dev == inputInfo.pointer)
|
||||
return 1;
|
||||
|
||||
button= filter->upAction.btn.button;
|
||||
|
|
|
@ -806,7 +806,7 @@ Bool
|
|||
XkbFilterEvents(ClientPtr pClient,int nEvents,xEvent *xE)
|
||||
{
|
||||
int i, button_mask;
|
||||
DeviceIntPtr pXDev = (DeviceIntPtr)LookupKeyboardDevice();
|
||||
DeviceIntPtr pXDev = inputInfo.keyboard;
|
||||
XkbSrvInfoPtr xkbi;
|
||||
|
||||
xkbi= pXDev->key->xkbInfo;
|
||||
|
|
|
@ -239,7 +239,7 @@ unsigned oldState;
|
|||
|
||||
if (dev->key && dev->key->xkbInfo)
|
||||
kbd= dev;
|
||||
else kbd= (DeviceIntPtr)LookupKeyboardDevice();
|
||||
else kbd= inputInfo.keyboard;
|
||||
|
||||
state= &kbd->key->xkbInfo->state;
|
||||
ctrls= kbd->key->xkbInfo->desc->ctrls;
|
||||
|
@ -444,7 +444,7 @@ XkbIndicatorMapPtr map;
|
|||
XkbDescPtr xkb;
|
||||
|
||||
if ((sli->flags&XkbSLI_HasOwnState)==0)
|
||||
dev= (DeviceIntPtr)LookupKeyboardDevice();
|
||||
dev= inputInfo.keyboard;
|
||||
|
||||
sli->usesBase&= ~which;
|
||||
sli->usesLatched&= ~which;
|
||||
|
@ -731,7 +731,7 @@ xkbExtensionDeviceNotify my_ed;
|
|||
return;
|
||||
if (dev->key && dev->key->xkbInfo)
|
||||
kbd= dev;
|
||||
else kbd= (DeviceIntPtr)LookupKeyboardDevice();
|
||||
else kbd= inputInfo.keyboard;
|
||||
|
||||
if (ed==NULL) {
|
||||
ed= &my_ed;
|
||||
|
@ -808,7 +808,7 @@ xkbExtensionDeviceNotify my_ed;
|
|||
return;
|
||||
if (dev->key && dev->key->xkbInfo)
|
||||
kbd= dev;
|
||||
else kbd= (DeviceIntPtr)LookupKeyboardDevice();
|
||||
else kbd= inputInfo.keyboard;
|
||||
|
||||
if (ed==NULL) {
|
||||
ed= &my_ed;
|
||||
|
@ -869,7 +869,7 @@ Bool kb_changed;
|
|||
return;
|
||||
if (dev->key && dev->key->xkbInfo)
|
||||
kbd= dev;
|
||||
else kbd= (DeviceIntPtr)LookupKeyboardDevice();
|
||||
else kbd= inputInfo.keyboard;
|
||||
xkbi= kbd->key->xkbInfo;
|
||||
|
||||
if (changes==NULL) {
|
||||
|
|
|
@ -71,7 +71,7 @@ Bool xkbCares,isBtn;
|
|||
if ((!isBtn)||((dev->button)&&(dev->button->xkb_acts))) {
|
||||
DeviceIntPtr kbd;
|
||||
if (dev->key) kbd= dev;
|
||||
else kbd= (DeviceIntPtr)LookupKeyboardDevice();
|
||||
else kbd= inputInfo.keyboard;
|
||||
XkbHandleActions(dev,kbd,xE,count);
|
||||
return;
|
||||
}
|
||||
|
|
143
xkb/xkbUtils.c
143
xkb/xkbUtils.c
|
@ -49,92 +49,115 @@ int XkbDisableLockActions = 0;
|
|||
|
||||
/***====================================================================***/
|
||||
|
||||
DeviceIntPtr
|
||||
_XkbLookupAnyDevice(int id,int *why_rtrn)
|
||||
int
|
||||
_XkbLookupAnyDevice(DeviceIntPtr *pDev, int id, ClientPtr client,
|
||||
Mask access_mode, int *xkb_err)
|
||||
{
|
||||
DeviceIntPtr dev = NULL;
|
||||
int rc = XkbKeyboardErrorCode;
|
||||
|
||||
dev= (DeviceIntPtr)LookupKeyboardDevice();
|
||||
if ((id==XkbUseCoreKbd)||(dev->id==id))
|
||||
return dev;
|
||||
|
||||
dev= (DeviceIntPtr)LookupPointerDevice();
|
||||
if ((id==XkbUseCorePtr)||(dev->id==id))
|
||||
return dev;
|
||||
|
||||
if (id&(~0xff))
|
||||
dev = NULL;
|
||||
|
||||
dixLookupDevice(&dev, id, serverClient, DixUnknownAccess);
|
||||
if (dev!=NULL)
|
||||
return dev;
|
||||
if ((!dev)&&(why_rtrn))
|
||||
*why_rtrn= XkbErr_BadDevice;
|
||||
return dev;
|
||||
if (id == XkbUseCoreKbd) {
|
||||
if (inputInfo.keyboard)
|
||||
id = inputInfo.keyboard->id;
|
||||
else
|
||||
goto out;
|
||||
}
|
||||
if (id == XkbUseCorePtr) {
|
||||
if (inputInfo.pointer)
|
||||
id = inputInfo.pointer->id;
|
||||
else
|
||||
goto out;
|
||||
}
|
||||
rc = dixLookupDevice(pDev, id, client, access_mode);
|
||||
out:
|
||||
if (rc != Success)
|
||||
*xkb_err = XkbErr_BadDevice;
|
||||
return rc;
|
||||
}
|
||||
|
||||
DeviceIntPtr
|
||||
_XkbLookupKeyboard(int id,int *why_rtrn)
|
||||
int
|
||||
_XkbLookupKeyboard(DeviceIntPtr *pDev, int id, ClientPtr client,
|
||||
Mask access_mode, int *xkb_err)
|
||||
{
|
||||
DeviceIntPtr dev = NULL;
|
||||
DeviceIntPtr dev;
|
||||
int rc;
|
||||
|
||||
if (id == XkbDfltXIId)
|
||||
id = XkbUseCoreKbd;
|
||||
if ((dev= _XkbLookupAnyDevice(id,why_rtrn))==NULL)
|
||||
return NULL;
|
||||
else if ((!dev->key)||(!dev->key->xkbInfo)) {
|
||||
if (why_rtrn)
|
||||
*why_rtrn= XkbErr_BadClass;
|
||||
return NULL;
|
||||
|
||||
rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
dev = *pDev;
|
||||
if (!dev->key || !dev->key->xkbInfo) {
|
||||
*pDev = NULL;
|
||||
*xkb_err= XkbErr_BadClass;
|
||||
return XkbKeyboardErrorCode;
|
||||
}
|
||||
return dev;
|
||||
return Success;
|
||||
}
|
||||
|
||||
DeviceIntPtr
|
||||
_XkbLookupBellDevice(int id,int *why_rtrn)
|
||||
int
|
||||
_XkbLookupBellDevice(DeviceIntPtr *pDev, int id, ClientPtr client,
|
||||
Mask access_mode, int *xkb_err)
|
||||
{
|
||||
DeviceIntPtr dev = NULL;
|
||||
DeviceIntPtr dev;
|
||||
int rc;
|
||||
|
||||
if ((dev= _XkbLookupAnyDevice(id,why_rtrn))==NULL)
|
||||
return NULL;
|
||||
else if ((!dev->kbdfeed)&&(!dev->bell)) {
|
||||
if (why_rtrn)
|
||||
*why_rtrn= XkbErr_BadClass;
|
||||
return NULL;
|
||||
rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
dev = *pDev;
|
||||
if (!dev->kbdfeed && !dev->bell) {
|
||||
*pDev = NULL;
|
||||
*xkb_err= XkbErr_BadClass;
|
||||
return XkbKeyboardErrorCode;
|
||||
}
|
||||
return dev;
|
||||
return Success;
|
||||
}
|
||||
|
||||
DeviceIntPtr
|
||||
_XkbLookupLedDevice(int id,int *why_rtrn)
|
||||
int
|
||||
_XkbLookupLedDevice(DeviceIntPtr *pDev, int id, ClientPtr client,
|
||||
Mask access_mode, int *xkb_err)
|
||||
{
|
||||
DeviceIntPtr dev = NULL;
|
||||
DeviceIntPtr dev;
|
||||
int rc;
|
||||
|
||||
if (id == XkbDfltXIId)
|
||||
id = XkbUseCorePtr;
|
||||
if ((dev= _XkbLookupAnyDevice(id,why_rtrn))==NULL)
|
||||
return NULL;
|
||||
else if ((!dev->kbdfeed)&&(!dev->leds)) {
|
||||
if (why_rtrn)
|
||||
*why_rtrn= XkbErr_BadClass;
|
||||
return NULL;
|
||||
|
||||
rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
dev = *pDev;
|
||||
if (!dev->kbdfeed && !dev->leds) {
|
||||
*pDev = NULL;
|
||||
*xkb_err= XkbErr_BadClass;
|
||||
return XkbKeyboardErrorCode;
|
||||
}
|
||||
return dev;
|
||||
return Success;
|
||||
}
|
||||
|
||||
DeviceIntPtr
|
||||
_XkbLookupButtonDevice(int id,int *why_rtrn)
|
||||
int
|
||||
_XkbLookupButtonDevice(DeviceIntPtr *pDev, int id, ClientPtr client,
|
||||
Mask access_mode, int *xkb_err)
|
||||
{
|
||||
DeviceIntPtr dev = NULL;
|
||||
DeviceIntPtr dev;
|
||||
int rc;
|
||||
|
||||
if ((dev= _XkbLookupAnyDevice(id,why_rtrn))==NULL)
|
||||
return NULL;
|
||||
else if (!dev->button) {
|
||||
if (why_rtrn)
|
||||
*why_rtrn= XkbErr_BadClass;
|
||||
return NULL;
|
||||
rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
dev = *pDev;
|
||||
if (!dev->button) {
|
||||
*pDev = NULL;
|
||||
*xkb_err= XkbErr_BadClass;
|
||||
return XkbKeyboardErrorCode;
|
||||
}
|
||||
return dev;
|
||||
return Success;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue
Block a user