Bug 30527 - XKB keygrabs broken
Summary: XKB keygrabs broken
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/XKB (show other bugs)
Version: git
Hardware: Other Linux (All)
: medium normal
Assignee: Daniel Stone
QA Contact: Xorg Project Team
Depends on:
Reported: 2010-09-30 20:06 UTC by Alex Chiang
Modified: 2010-11-09 17:16 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:

test case illustrating broken xkb keygrabs (5.17 KB, text/plain)
2010-09-30 20:06 UTC, Alex Chiang
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Chiang 2010-09-30 20:06:12 UTC
Created attachment 39093 [details]
test case illustrating broken xkb keygrabs

This issue and resulting test case are from Havoc Pennington; I'm just forwarding on.

Running the test case results in an error on recent libX11. First noticed in Ubuntu Lucid, which ships libx11-6 1.3.2. Today, I was able to test top of tree in git and it also results in the same error:

Grabbing keysym 0xff50 keycode 0x6e using xkb
Sending map changes to server
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  144 (XKEYBOARD)
  Minor opcode of failed request:  9 (XkbSetMap)
  Value in failed request:  0x236e0001
  Serial number of failed request:  19
  Current serial number in output stream:  20

I tested this in an Ubuntu Hardy chroot, which ships 1.1.3, and it ran successfully:

Grabbing keysym 0xff50 keycode 0x6e using xkb
Sending map changes to server
Bound key OK
Xkb event received

I thought that I could try and bisect this, but building the old version of libX11 was a little tricky, and I couldn't get it going.

I was able to verify that it was broken in 1.2, but I couldn't build any of the 1.1.x series. So that should at least help you to narrow it down a little.

Comment 1 Peter Hutterer 2010-10-11 14:27:14 UTC
Proposed patches available here:

fwiw, this isn't an Xlib bug, it's a server bug.
Comment 2 Alex Chiang 2010-10-11 15:57:48 UTC
The link in your second patch seems wrong. It's pointing to #32527, while this bug is #30527.
Comment 3 Peter Hutterer 2010-11-09 17:16:29 UTC
commit 649293f6b634e6305b6737a841d6e9d0f0065d6c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Oct 11 16:09:18 2010 +1000

    xkb: always fill the symsPerKey array, regardless of client flags (#30527)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.