[PATCH] Xi: Fix modifiers in XIPassiveGrabDevice

Daniel Martin consume.noise at gmail.com
Wed Nov 7 02:31:01 PST 2012


XIPassiveGrabDevice uses a list of uint32_t as modifier sets.

The ModifierInfo struct represents the current modifier states and is
therefor used in XIQueryPointer and various events.

Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
 Xi/xipassivegrab.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index ddab53d..62a3a46 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -50,7 +50,7 @@ int
 SProcXIPassiveGrabDevice(ClientPtr client)
 {
     int i;
-    xXIModifierInfo *mods;
+    uint32_t *mods;
 
     REQUEST(xXIPassiveGrabDeviceReq);
 
@@ -63,12 +63,10 @@ SProcXIPassiveGrabDevice(ClientPtr client)
     swaps(&stuff->mask_len);
     swaps(&stuff->num_modifiers);
 
-    mods = (xXIModifierInfo *) &stuff[1];
+    mods = (uint32_t *) &stuff[1];
 
     for (i = 0; i < stuff->num_modifiers; i++, mods++) {
-        swapl(&mods->base_mods);
-        swapl(&mods->latched_mods);
-        swapl(&mods->locked_mods);
+        swapl(mods);
     }
 
     return ProcXIPassiveGrabDevice(client);
-- 
1.8.0



More information about the xorg-devel mailing list