state: fix base mod set/clear behavior
authorRan Benita <ran234@gmail.com>
Fri, 29 Jun 2012 21:07:09 +0000 (00:07 +0300)
committerRan Benita <ran234@gmail.com>
Sun, 1 Jul 2012 07:21:01 +0000 (10:21 +0300)
commite201c165364fdb6c74d7848ea361762a64ea75f2
treee48e1c2d46b5730c276780d953b0491102b932cb
parent13f030baf2dc1201068abd0b5f91792c3f5906bc
state: fix base mod set/clear behavior

This commit fixes the incorrect current behavior, where at the end of the
following key sequence
Left Shift down, Right Shift down, Left Shift up
the Shift modifier is cleared.

Clearly the code is not as nice as before, but it seems like some count
of the depressed modifiers must be kept.

The code is lifted mostly as is from xkbActions.c. [ There they also
assign to setMods and clearMods each time and not OR it. I assume its
correct, although I wouldn't have guessed... ]

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