MappingNotify does not get sent to all clients after using xmodmap(1)
Submitted by Michael Stapelberg
Assigned to Xorg Project Team
Created attachment 28424 test program using Xlib
I noticed that, using XCB, I do not get a mapping_notify event when I change the keyboard mapping using xmodmap, only when using setxkbmap. I then wrote several test programs (attached to this bug) and noticed the following:
When manually selecting XkbMapNotify events using XKB, I get events on setxkbmap and xmodmap. When using Xlib and calling XKeysymToKeycode at least once (so that it gets the keyboard mapping) I get events for setxkbmap and xmodmap. Xlib seems to generate these events from XkbMapNotify, though, see lib/X11/XKBUse.c:318. When using XCB and calling XKeysymToKeycode at least once, I still only get events for setxkbmap.
Is this a bug in the X server itself? Or are programs supposed to use XKB for getting all kinds of mapping_notify events?
Attachment 28424, "test program using Xlib":
Version: 7.4 (2008.09)