Issue when a KeyListEntry has the same name as an entry in a different KeyListEntries
This is an issue in Pop!_OS, but it seems like the underlying cause is in Gnome Control Center (if I'm wrong, feel free to explain why this is expected behavior.)
Pop!_OS adds a section of the keyboard configuration like this:
<KeyListEntries group="system" schema="org.gnome.shell.extensions.pop-shell" name="Navigate applications and windows"> <KeyListEntry name="search" description="Launch and switch applications"/> ... </KeyListEntries>
But as the issue I linked mentions, this "Launch and switch applications" entry isn't showing up. This seems weird, but after some testing, I identified something that makes it appear.
01-launchers.xml.in contains this:
<KeyListEntries group="system" schema="org.gnome.settings-daemon.plugins.media-keys" name="Launchers"> ... <KeyListEntry name="search" description="Search" msgctxt="keybinding">Search</KeyListEntry> </KeyListEntries>
I noticed this
KeyListEntry has the same
name. So I tried removing this line, and the entry added by Pop!_OS shows up where it's supposed to.
So, a few questions:
- Is it expected that there can't be two
KeyListEntrys like this in different sections? My thought was that it should work fine, since they are in different
KeyListEntriessections, and refer to different gconf schemas.
- If this is expected behavior, it should probably produce a warning/error, rather than one of them silently disappearing, right?
- Supposing I'm right that it's a bug, does anyone have an idea about the cause?
I think it might have something to do with one of the hash tables in
cc-keyboard-manager.c. But someone familiar with this code can probably much more easily think of which part is responsible.