Some key repeats do not work without XKB
Peter Hutterer
peter.hutterer at who-t.net
Mon Apr 27 17:04:39 PDT 2009
On Fri, Apr 24, 2009 at 04:23:36PM +0200, Pierre Ossman wrote:
> Another delightful bug when XKB is disabled. If you feed the core only
> repeated KeyPress events, it's supposed to generate KeyRelease events
> automatically. Unfortunately that code is broken and generates an
> incorrect list of events.
>
> Problems exists in 1.5 and 1.6.
>
> Patch:
>
> --- dix/getevents.c.orig 2009-04-24 16:16:44.000000000 +0200
> +++ dix/getevents.c 2009-04-24 16:19:20.000000000 +0200
> @@ -406,6 +406,7 @@ GetKeyboardValuatorEvents(xEvent *events
> int key_code, int first_valuator,
> int num_valuators, int *valuators) {
> int numEvents = 0;
> + int numReleaseEvents;
> CARD32 ms = 0;
> KeySym *map = pDev->key->curKeySyms.map;
> KeySym sym;
> @@ -470,11 +471,13 @@ GetKeyboardValuatorEvents(xEvent *events
> if (noXkbExtension)
> #endif
> {
> - numEvents += GetKeyboardValuatorEvents(events, pDev,
> - KeyRelease, key_code,
> - first_valuator, num_valuators,
> - valuators);
> - events += numEvents;
> + numReleaseEvents = GetKeyboardValuatorEvents(events, pDev,
> + KeyRelease, key_code,
> + first_valuator,
> + num_valuators,
> + valuators);
> + numEvents += numReleaseEvents;
> + events += numReleaseEvents;
> }
> }
ACK. Please open a bugreport for this, attach this patch and CC me on it. I'll
nominate it for the matching server branches.
While you're at it, please move the numReleaseEvents declaration into the
noXkbExtension block too.
To make it easier to apply your patch, please attach it as a git-formatted
patch.
http://wiki.x.org/wiki/Development/Documentation/SubmittingPatches
Cheers,
Peter
More information about the xorg-devel
mailing list