summaryrefslogtreecommitdiff
path: root/Xi/xipassivegrab.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-03-09 10:44:48 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-04-18 13:04:47 +1000
commit60b08e013dd1e971f82e5bc8708d3f120c217497 (patch)
tree26670bf28bb95bbec59b29f14cb12b721da80e43 /Xi/xipassivegrab.c
parenta3f37f3698880aec508b5ecfb88daf39360610aa (diff)
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>
Diffstat (limited to 'Xi/xipassivegrab.c')
-rw-r--r--Xi/xipassivegrab.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 5b4cc4610..ae4343344 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -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);
@@ -195,6 +197,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));
}
@@ -202,10 +207,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;
}