Skip to content

(release/25.1) xkb: Fix key type without level names in XkbCopyKeymap#2283

Open
metux wants to merge 1 commit intorelease/25.1from
pr/xkb-fix-key-type-without-level-names-in-xkbcopykeymap-_2026-04-18_19-50-35
Open

(release/25.1) xkb: Fix key type without level names in XkbCopyKeymap#2283
metux wants to merge 1 commit intorelease/25.1from
pr/xkb-fix-key-type-without-level-names-in-xkbcopykeymap-_2026-04-18_19-50-35

Conversation

@metux
Copy link
Copy Markdown
Contributor

@metux metux commented Apr 18, 2026

A key type that has no level names is legit. Before this commit,
XkbCopyKeymap would make such level inconsistent by setting its
number of levels to 0 while keeping its map entries. It suffices
to clear the names array.

Fixed by copying the level count from the source type.

WARNING: this will trigger an error in XkbGetNames, which worked
before this commit only by chance. This is fixed in the next commit.

Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2082

@metux metux self-assigned this Apr 18, 2026
@metux metux requested a review from a team April 18, 2026 17:50
A key type that has no level names is legit. Before this commit,
`XkbCopyKeymap` would make such level inconsistent by setting its
number of levels to 0 while keeping its map entries. It suffices
to clear the names array.

Fixed by copying the level count from the source type.

WARNING: this will trigger an error in `XkbGetNames`, which worked
before this commit only by chance. This is fixed in the next commit.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2082>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
@metux metux force-pushed the pr/xkb-fix-key-type-without-level-names-in-xkbcopykeymap-_2026-04-18_19-50-35 branch from 4d4db61 to f0a7223 Compare April 19, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants