Commit 252a69b5 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

xkb: use local variable instead of casting arg



No functional changes.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 24525d96
......@@ -281,12 +281,12 @@ AccessXStickyKeysTurnOff(DeviceIntPtr dev, xkbControlsNotify * pCN)
static CARD32
AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg)
{
XkbSrvInfoPtr xkbi = ((DeviceIntPtr) arg)->key->xkbInfo;
xkbControlsNotify cn;
DeviceIntPtr dev = arg;
XkbSrvInfoPtr xkbi = dev->key->xkbInfo;
if (xkbi->krgTimerActive == _KRG_WARN_TIMER) {
XkbDDXAccessXBeep((DeviceIntPtr) arg, _BEEP_SLOW_WARN,
XkbStickyKeysMask);
XkbDDXAccessXBeep(dev, _BEEP_SLOW_WARN, XkbStickyKeysMask);
xkbi->krgTimerActive = _KRG_TIMER;
return 4000;
}
......@@ -296,11 +296,11 @@ AccessXKRGExpire(OsTimerPtr timer, CARD32 now, pointer arg)
cn.requestMajor = 0;
cn.requestMinor = 0;
if (xkbi->desc->ctrls->enabled_ctrls & XkbSlowKeysMask) {
AccessXKRGTurnOff((DeviceIntPtr) arg, &cn);
AccessXKRGTurnOff(dev, &cn);
LogMessage(X_INFO, "XKB SlowKeys are disabled.\n");
}
else {
AccessXKRGTurnOn((DeviceIntPtr) arg, XkbSlowKeysMask, &cn);
AccessXKRGTurnOn(dev, XkbSlowKeysMask, &cn);
LogMessage(X_INFO, "XKB SlowKeys are now enabled. Hold shift to disable.\n");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment