state: don't ignore type argument in xkb_state_mod_*_are_active
authorRan Benita <ran234@gmail.com>
Wed, 3 Oct 2012 18:16:09 +0000 (20:16 +0200)
committerRan Benita <ran234@gmail.com>
Sat, 6 Oct 2012 19:41:58 +0000 (21:41 +0200)
Signed-off-by: Ran Benita <ran234@gmail.com>
src/state.c

index 1fad36f..95b9e66 100644 (file)
@@ -859,11 +859,12 @@ xkb_state_mod_index_is_active(struct xkb_state *state,
  * xkb_state_mod_names_are_active.
  */
 static int
-match_mod_masks(struct xkb_state *state, enum xkb_state_match match,
+match_mod_masks(struct xkb_state *state,
+                enum xkb_state_component type,
+                enum xkb_state_match match,
                 xkb_mod_mask_t wanted)
 {
-    xkb_mod_mask_t active = xkb_state_serialize_mods(state,
-                                                     XKB_STATE_EFFECTIVE);
+    xkb_mod_mask_t active = xkb_state_serialize_mods(state, type);
 
     if (!(match & XKB_STATE_MATCH_NON_EXCLUSIVE) && (active & ~wanted))
         return 0;
@@ -908,7 +909,7 @@ xkb_state_mod_indices_are_active(struct xkb_state *state,
     if (ret == -1)
         return ret;
 
-    return match_mod_masks(state, match, wanted);
+    return match_mod_masks(state, type, match, wanted);
 }
 
 /**
@@ -960,7 +961,7 @@ xkb_state_mod_names_are_active(struct xkb_state *state,
     if (ret == -1)
         return ret;
 
-    return match_mod_masks(state, match, wanted);
+    return match_mod_masks(state, type, match, wanted);
 }
 
 /**