summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2010-12-28 17:00:29 +0000
committerDaniel Stone <daniel@fooishbar.org>2011-01-06 17:10:02 +0000
commite1aed88be92c27d76bff1743f35f9915dea9264f (patch)
treed9eea1c87fb9173e898ec77d51aae9d4b21d92c4
parentf3480286aeb3009623d8d4b0202eadda0049552d (diff)
Input: Swap flags in DeviceEvents
Swap flags for different-endian clients when delivering XI2 DeviceEvents. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--Xi/extinit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Xi/extinit.c b/Xi/extinit.c
index 546ccb42e..82df7eb02 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -757,6 +757,7 @@ static void SDeviceEvent(xXIDeviceEvent *from, xXIDeviceEvent *to)
swapl(&to->mods.latched_mods, n);
swapl(&to->mods.locked_mods, n);
swapl(&to->mods.effective_mods, n);
+ swapl(&to->flags, n);
ptr = (char*)(&to[1]);
ptr += from->buttons_len * 4;