When we update an XKB map for a slave device and that slave device is its master's last-used slave, we need to update the master's XKB map as well or our update of the slave will have no effect until we change slave devices, which may never happen if a machine has only one attached keyboard.
This bug is essentially the same as https://bugs.freedesktop.org/show_bug.cgi?id=21859. The fix for that bug involved adding code to ProcXkbGetKbdByName to propagate slave changes to masters, but it dealt only with the XkbGetKeyboardByName case; it's also possible to change XKB maps using XkbSetMap, and that path is still buggy in the way XkbGetKeyboardByName was before the fix for 21859.
The specific case that this bug breaks is calling xkbcomp -i N ... $DISPLAY, where N is a slave device identifier. This command has no effect until the master's lastSlave transitions to some other device and back (e.g., by plugging in an external keyboard and banging on it). I locally hacked up my X server to update master devices in ProcXkbSetMap; after that, xkbcomp worked as intended.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/293.