[PATCH v2] [xserver] xkb: Cancel a key's repetition when its autorepeat is disabled.
Peter Hutterer
peter.hutterer at who-t.net
Sun Jan 23 16:04:58 PST 2011
On Fri, Jan 21, 2011 at 03:56:22PM +0200, Erkki Seppälä wrote:
> When XkbChangeEnabledControls is called to disable key repetition of a
> certain key (or keys), currently ongoing repetition of that key was
> not cancelled. It was cancelled if ChangeKeyboardControl was used to
> disable key repetition globally.
>
> Reviewed-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
> ---
> xkb/xkb.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/xkb/xkb.c b/xkb/xkb.c
> index 7d95bc0..395f6fc 100644
> --- a/xkb/xkb.c
> +++ b/xkb/xkb.c
> @@ -915,9 +915,14 @@ ProcXkbSetControls(ClientPtr client)
> stuff->axtOptsMask);
> }
>
> - if (stuff->changeCtrls & XkbPerKeyRepeatMask)
> + if (stuff->changeCtrls & XkbPerKeyRepeatMask) {
> memcpy(new.per_key_repeat, stuff->perKeyRepeat,
> XkbPerKeyBitArraySize);
> + if (xkbi->repeatKey &&
> + !BitIsOn(new.per_key_repeat, xkbi->repeatKey)) {
> + AccessXCancelRepeatKey(xkbi, xkbi->repeatKey);
> + }
> + }
>
> old= *ctrl;
> *ctrl= new;
> --
> 1.7.0.4
sorry, replied to the wrong email. I applied this one, please send me your
Signed-off-by though.
>
Cheers,
Peter
More information about the xorg-devel
mailing list