map: share some code
authorRan Benita <ran234@gmail.com>
Fri, 10 Aug 2012 07:17:32 +0000 (10:17 +0300)
committerRan Benita <ran234@gmail.com>
Fri, 10 Aug 2012 10:49:19 +0000 (13:49 +0300)
commitef518a10af83c294238ab1958ba6dbfdb758006b
tree1a169015beb3d6e2771347ee326b7eade7053856
parent75853ed66b87ceeac7067818cb8559ecb40bb9b0
map: share some code

Make more extensive use of get_entry_for_key_state, and add
key_get_consumed to use in the other consume functions.

There's also a slight change in the consumed mods calculations, where
we use entry->mods.mask instead of type->mods.mask. The original was
copied from what libX11 does but what we do now is more logically
correct. The result is exactly the same though because:
type->mods.mask ⊇ entry->mods.mask ⊇ entry->preserve.mask

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