From e1aed88be92c27d76bff1743f35f9915dea9264f Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 28 Dec 2010 17:00:29 +0000 Subject: [PATCH] Input: Swap flags in DeviceEvents Swap flags for different-endian clients when delivering XI2 DeviceEvents. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Reviewed-by: Chase Douglas --- Xi/extinit.c | 1 + 1 file changed, 1 insertion(+) 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;