diff options
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r-- | Xi/exevents.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 1bcc101a7..fd3d3ad76 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -74,6 +74,10 @@ SOFTWARE. #include "dixgrabs.h" /* CreateGrab() */ #include "scrnintstr.h" +#ifdef XKB +#include "xkbsrv.h" +#endif + #define WID(w) ((w) ? ((w)->drawable.id) : 0) #define AllModifiersMask ( \ ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ @@ -1004,7 +1008,7 @@ SetModifierMapping(ClientPtr client, DeviceIntPtr dev, int len, int rlen, } void -SendDeviceMappingNotify(CARD8 request, +SendDeviceMappingNotify(ClientPtr client, CARD8 request, KeyCode firstKeyCode, CARD8 count, DeviceIntPtr dev) { xEvent event; @@ -1019,6 +1023,11 @@ SendDeviceMappingNotify(CARD8 request, ev->count = count; } +#ifdef XKB + if (request == MappingKeyboard || request == MappingModifier) + XkbApplyMappingChange(dev, request, firstKeyCode, count, client); +#endif + SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) ev, 1); } @@ -1054,7 +1063,7 @@ ChangeKeyMapping(ClientPtr client, keysyms.map = map; if (!SetKeySymsMap(&k->curKeySyms, &keysyms)) return BadAlloc; - SendDeviceMappingNotify(MappingKeyboard, firstKeyCode, keyCodes, dev); + SendDeviceMappingNotify(client, MappingKeyboard, firstKeyCode, keyCodes, dev); return client->noClientException; } |