state: don't ignore type argument in xkb_state_mod_*_are_active Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/src/state.c b/src/state.c
index 1fad36f..95b9e66 100644
--- a/src/state.c
+++ b/src/state.c
@@ -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);
}
/**