xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 2 01:20:45 UTC 2023


 hw/xfree86/common/xf86Xinput.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1bb6991bdac04a548505469b3fa4ed2742ca7f66
Author: Pedro Montes Alcalde <pedro.montes.alcalde at gmail.com>
Date:   Thu Nov 2 01:20:41 2023 +0000

    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 at gmail.com>

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 8cf3f62f0..5b9823ed2 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -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;
 }
 
 /***********************************************************************


More information about the xorg-commit mailing list