AutoRepeat: Fix wrong repeat rate being applied
When you set the auto repeat rate trough xset to something like 250 40: `xset r rate 250 40` Is setting the first delay to 250ms and set the rate to 40hz (25ms) However, if you were to apply this configuration from a xorg config file, the result would be the first delay being applied correctly, but the repeat rate would be set to 25Hz instead. This is because the config option is using a rate of repeats per second but XKB stores it as interval. Make sure this is converted correctly. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1558 Signed-off-by: EXtremeExploit <pedro.montes.alcalde@gmail.com>
This commit is contained in:
parent
910847f452
commit
1bb6991bda
|
@ -347,7 +347,7 @@ ApplyAutoRepeat(DeviceIntPtr dev)
|
|||
|
||||
xf86Msg(X_CONFIG, "AutoRepeat: %ld %ld\n", delay, rate);
|
||||
xkbi->desc->ctrls->repeat_delay = delay;
|
||||
xkbi->desc->ctrls->repeat_interval = rate;
|
||||
xkbi->desc->ctrls->repeat_interval = 1000 / rate;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in New Issue