Convert the fake ID XkbUseCorePtr and XkbUseCoreKbd ids to the real core pointer/keyboard for this particular client by using PickPointer and PickKeyboard.
Signed-off-by: Peter Hutterer <[email protected]> --- xkb/xkb.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xkb/xkb.c b/xkb/xkb.c index bfed114..2b69fce 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -54,11 +54,14 @@ static RESTYPE RT_XKBCLIENT; /***====================================================================***/ -#define CHK_DEVICE(dev, id, client, access_mode, lf) {\ +#define CHK_DEVICE(dev, deviceid, client, access_mode, lf) {\ int why;\ - int rc = lf(&(dev), id, client, access_mode, &why);\ + int rc; \ + if (deviceid == XkbUseCorePtr) deviceid = PickPointer(client)->id; \ + else if (deviceid == XkbUseCoreKbd) deviceid = PickKeyboard(client)->id; \ + rc = lf(&(dev), deviceid, client, access_mode, &why);\ if (rc != Success) {\ - client->errorValue = _XkbErrCode2(why, id);\ + client->errorValue = _XkbErrCode2(why, deviceid);\ return rc;\ }\ } -- 1.6.6 _______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
