aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/ModMap.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/ModMap.c')
-rw-r--r--libX11/src/ModMap.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/libX11/src/ModMap.c b/libX11/src/ModMap.c
index 836a67621..2fabc560c 100644
--- a/libX11/src/ModMap.c
+++ b/libX11/src/ModMap.c
@@ -79,17 +79,11 @@ XSetModifierMapping(
int mapSize = modifier_map->max_keypermod << 3; /* 8 modifiers */
LockDisplay(dpy);
- GetReqExtra(SetModifierMapping, mapSize, req);
- if (!req) {
- UnlockDisplay(dpy);
- return MappingFailed;
- }
-
+ GetReq(SetModifierMapping, req);
+ req->length += mapSize >> 2;
req->numKeyPerModifier = modifier_map->max_keypermod;
- memcpy((char *) NEXTPTR(req,xSetModifierMappingReq),
- (char *) modifier_map->modifiermap,
- mapSize);
+ Data(dpy, modifier_map->modifiermap, mapSize);
(void) _XReply(dpy, (xReply *) & rep,
(SIZEOF(xSetModifierMappingReply) - SIZEOF(xReply)) >> 2, xTrue);