mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-10 00:00:16 +01:00
Xi: don't swap the status byte in the XIPassiveGrab replies
Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 60b08e013d)
This commit is contained in:
parent
0de1802c99
commit
d2c9f331d2
1 changed files with 7 additions and 4 deletions
|
|
@ -43,6 +43,7 @@
|
|||
#include "exevents.h"
|
||||
#include "xipassivegrab.h"
|
||||
#include "dixgrabs.h"
|
||||
#include "misc.h"
|
||||
|
||||
int
|
||||
SProcXIPassiveGrabDevice(ClientPtr client)
|
||||
|
|
@ -87,6 +88,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
GrabParameters param;
|
||||
void *tmp;
|
||||
int mask_len;
|
||||
int n;
|
||||
|
||||
REQUEST(xXIPassiveGrabDeviceReq);
|
||||
REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
|
||||
|
|
@ -198,6 +200,9 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
|
||||
info->status = status;
|
||||
info->modifiers = *modifiers;
|
||||
if (client->swapped)
|
||||
swapl(&info->modifiers, n);
|
||||
|
||||
rep.num_modifiers++;
|
||||
rep.length += bytes_to_int32(sizeof(xXIGrabModifierInfo));
|
||||
}
|
||||
|
|
@ -205,10 +210,8 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
|
||||
WriteReplyToClient(client, sizeof(rep), &rep);
|
||||
if (rep.num_modifiers)
|
||||
{
|
||||
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
||||
WriteSwappedDataToClient(client, rep.length * 4, (char*)modifiers_failed);
|
||||
}
|
||||
WriteToClient(client, rep.length * 4, (char*)modifiers_failed);
|
||||
|
||||
free(modifiers_failed);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue