summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-08-21 12:29:39 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-08-24 10:09:05 +1000
commit1b3859a49a3861517c9b34f6e8750f7ae0ff2b5d (patch)
treeb451bd0b0456edd550f39f754e84e2ceb667ce00 /Xi
parentfe430d7d3b0a85fbea9e93171423688f76dc9e1e (diff)
Xi: add swapping hook for XIGetFocus reply.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/extinit.c2
-rw-r--r--Xi/xisetdevfocus.c10
-rw-r--r--Xi/xisetdevfocus.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/Xi/extinit.c b/Xi/extinit.c
index e3590838a..d91de8f0e 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -525,6 +525,8 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep)
SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep);
else if (rep->RepType == X_XIGetSelectedEvents)
SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep);
+ else if (rep->RepType == X_XIGetFocus)
+ SRepXIGetFocus(client, len, (xXIGetFocusReply *) rep);
else {
FatalError("XINPUT confused sending swapped reply");
}
diff --git a/Xi/xisetdevfocus.c b/Xi/xisetdevfocus.c
index 32f7e597b..059424e41 100644
--- a/Xi/xisetdevfocus.c
+++ b/Xi/xisetdevfocus.c
@@ -118,3 +118,13 @@ ProcXIGetFocus(ClientPtr client)
WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep);
return Success;
}
+
+void
+SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply *rep)
+{
+ char n;
+ swaps(&rep->sequenceNumber, n);
+ swapl(&rep->length, n);
+ swapl(&rep->focus, n);
+ WriteToClient(client, len, (char *)rep);
+}
diff --git a/Xi/xisetdevfocus.h b/Xi/xisetdevfocus.h
index 5ec1fa2cf..eb584eb76 100644
--- a/Xi/xisetdevfocus.h
+++ b/Xi/xisetdevfocus.h
@@ -32,4 +32,5 @@ int ProcXISetFocus(ClientPtr client);
int SProcXIGetFocus(ClientPtr client);
int ProcXIGetFocus(ClientPtr client);
+void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply* rep);
#endif /* XISETDEVFOCUS_H */