summaryrefslogtreecommitdiff
path: root/Xi/exevents.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-11-07 15:37:23 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-11-07 15:37:23 +1030
commit0b729051c04da7068f1e6dd319190bd0a362b2c0 (patch)
tree6e15c5de67a40d04167fcf0a2e0e26af8eca11c2 /Xi/exevents.c
parentb7ee005d327372c1e414ee6c526f9f7aee14bc86 (diff)
parentd7c5e8bfc1aecbd23a4cbb2eab08656587aac2e8 (diff)
Merge branch 'master' into mpx
Conflicts: Xi/extinit.c Xi/grabdev.c Xi/setmode.c Xi/ungrdev.c dix/devices.c dix/events.c dix/getevents.c include/dix.h mi/midispcur.c mi/misprite.c xkb/xkbActions.c xkb/xkbEvents.c xkb/xkbPrKeyEv.c
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r--Xi/exevents.c13
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;
}