wlt: toolkit: fix stuck key repeat bug

1. Depress Shift
2. Depress K
3. Release Shift
4. Release K

Observed: key stuck repeat
Expected: key not stuck repeating

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
Martin Minarik authored and David Herrmann committed 2013-01-27 15:27:13 +01:00
1 parent 4f8edb38c8
commit 7dd5bf25fc
1 file changed
+1 -2
+1 -2
View File
@@ -681,8 +681,7 @@ static void keyboard_key(void *data, struct wl_keyboard *keyboard,
}
}
if (state == WL_KEYBOARD_KEY_STATE_RELEASED &&
sym == disp->repeat_sym) {
if (state == WL_KEYBOARD_KEY_STATE_RELEASED) {
ev_timer_update(disp->repeat_timer, NULL);
} else if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
disp->repeat_sym = sym;