mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
Xi: fix byte-swapping in SProcXIPassiveGrabDevice()
Yet another old Xorg bug: the even masks are transmitted as CARD32's, so they also need to be byte-swapped. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
65ed6145d8
commit
b7e6a90580
@@ -68,9 +68,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
||||
((uint32_t) stuff->mask_len + stuff->num_modifiers) *4);
|
||||
|
||||
if (client->swapped) {
|
||||
uint32_t *mods = (uint32_t *) &stuff[1] + stuff->mask_len;
|
||||
for (int i = 0; i < stuff->num_modifiers; i++, mods++)
|
||||
swapl(mods);
|
||||
SwapLongs((CARD32*)&stuff[1], stuff->num_modifiers + stuff->mask_len);
|
||||
}
|
||||
|
||||
DeviceIntPtr dev, mod_dev;
|
||||
|
||||
Reference in New Issue
Block a user