[PATCH libXi] Fill in mods/group->effective in XIQueryPointer()

carlosg at gnome.org carlosg at gnome.org
Mon Jan 24 03:35:04 PST 2011


From: Carlos Garnacho <carlosg at gnome.org>

the other XIModifierState/XIGroupState fields are being set correctly,
but the "effective" field was being left as undefined memory.
---
 src/XIQueryPointer.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/XIQueryPointer.c b/src/XIQueryPointer.c
index b3bfebc..e068a97 100644
--- a/src/XIQueryPointer.c
+++ b/src/XIQueryPointer.c
@@ -86,9 +86,12 @@ XIQueryPointer(Display     *dpy,
     mods->base          = rep.mods.base_mods;
     mods->latched       = rep.mods.latched_mods;
     mods->locked        = rep.mods.locked_mods;
+    mods->effective     = mods->base | mods->latched | mods->locked;
+
     group->base         = rep.group.base_group;
     group->latched      = rep.group.latched_group;
     group->locked       = rep.group.locked_group;
+    group->effective    = group->base | group->latched | group->locked;
 
     buttons->mask_len   = rep.buttons_len * 4;
     buttons->mask       = malloc(buttons->mask_len);
-- 
1.7.3.4



More information about the xorg-devel mailing list