state: make sure the mods are fully resolved after xkb_state_update_mask()
authorRan Benita <ran234@gmail.com>
Mon, 18 Aug 2014 17:27:07 +0000 (20:27 +0300)
committerRan Benita <ran234@gmail.com>
Mon, 18 Aug 2014 18:46:39 +0000 (21:46 +0300)
commita1f0595a683a167901a2f1d9f02b9b637bd762a6
tree7e21cc7ff33fd45b879d41b29404c2a623d79bc1
parent99184f1614548722e3531e55bb19ac74327c98cb
state: make sure the mods are fully resolved after xkb_state_update_mask()

Virtual modifiers can have "mappings" to real modifiers, e.g. NumLock
may also set Mod2. In a normal turn of events, the various components
(depressed, latched, locked, and consequently effective) include the
mapped mods, because the masks are pre-resolved everywhere. However,
xkb_state_update_mask() accepts arbitrary mod masks, which may not be
resolved (if it comes from somewhere other than
xkb_state_serialize_mods()). So let's always resolve them ourselves.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/state.c