xkb: latches were not always released correctly

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
Ran Benita authored and David Herrmann committed 2011-12-31 16:27:27 +01:00
1 parent a407143174
commit fdf73407b7
1 file changed
+5 -4
+5 -4
View File
@@ -631,7 +631,7 @@ uint16_t find_shift_level(struct xkb_desc *desc, KeyCode keycode,
continue;
/*
* Must march exactly after we masked it with the key_type's
* Must match exactly after we masked it with the key_type's
* mask.
*/
if (entry->mods.mask == masked_mods)
@@ -659,7 +659,7 @@ bool process_evdev_key(struct xkb_desc *desc, struct xkb_state *state,
uint16_t shift_level;
uint32_t sym;
union xkb_action *action;
bool state_changed;
bool state_changed, event_filled;
keycode = code + desc->min_key_code;
@@ -685,13 +685,14 @@ bool process_evdev_key(struct xkb_desc *desc, struct xkb_state *state,
key_state, action);
}
event_filled = false;
if (key_state != KEY_STATE_RELEASED) {
out->keycode = code;
out->keysym = sym;
out->modifiers = state->mods;
out->unicode = KeysymToUcs4(sym);
return true;
event_filled = true;
}
if (state_changed) {
@@ -702,7 +703,7 @@ bool process_evdev_key(struct xkb_desc *desc, struct xkb_state *state,
update_effective_group(desc, state);
}
return false;
return event_filled;
}
/*