xkb: ProcXkbSetGeometry should work on all attached SDs.
If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs.
This commit is contained in:
parent
5ba87c3327
commit
d9ca9819e9
57
xkb/xkb.c
57
xkb/xkb.c
|
@ -5242,26 +5242,15 @@ char * wire;
|
|||
return Success;
|
||||
}
|
||||
|
||||
/* FIXME: Needs to set geom on all core-sending devices. */
|
||||
int
|
||||
ProcXkbSetGeometry(ClientPtr client)
|
||||
static int
|
||||
_XkbSetGeometry(ClientPtr client, DeviceIntPtr dev, xkbSetGeometryReq *stuff)
|
||||
{
|
||||
DeviceIntPtr dev;
|
||||
XkbGeometryPtr geom,old;
|
||||
XkbGeometrySizesRec sizes;
|
||||
Status status;
|
||||
XkbDescPtr xkb;
|
||||
Bool new_name;
|
||||
xkbNewKeyboardNotify nkn;
|
||||
|
||||
REQUEST(xkbSetGeometryReq);
|
||||
REQUEST_AT_LEAST_SIZE(xkbSetGeometryReq);
|
||||
|
||||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
|
||||
CHK_ATOM_OR_NONE(stuff->name);
|
||||
XkbGeometryPtr geom,old;
|
||||
XkbGeometrySizesRec sizes;
|
||||
Status status;
|
||||
|
||||
xkb= dev->key->xkbInfo->desc;
|
||||
old= xkb->geom;
|
||||
|
@ -5307,6 +5296,42 @@ ProcXkbSetGeometry(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
int
|
||||
ProcXkbSetGeometry(ClientPtr client)
|
||||
{
|
||||
DeviceIntPtr dev;
|
||||
int rc;
|
||||
|
||||
REQUEST(xkbSetGeometryReq);
|
||||
REQUEST_AT_LEAST_SIZE(xkbSetGeometryReq);
|
||||
|
||||
if (!(client->xkbClientFlags&_XkbClientInitialized))
|
||||
return BadAccess;
|
||||
|
||||
CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess);
|
||||
CHK_ATOM_OR_NONE(stuff->name);
|
||||
|
||||
rc = _XkbSetGeometry(client, dev, stuff);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
if (stuff->deviceSpec == XkbUseCoreKbd)
|
||||
{
|
||||
DeviceIntPtr other;
|
||||
for (other = inputInfo.devices; other; other = other->next)
|
||||
{
|
||||
if ((other != dev) && other->key && !other->isMaster && (other->u.master == dev))
|
||||
{
|
||||
rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess);
|
||||
if (rc == Success)
|
||||
_XkbSetGeometry(client, other, stuff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue
Block a user