From 71d5e0e77a49ff6b78d84cebfbb9b5532ba3d590 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Wed, 9 Nov 2016 14:38:20 +0900 Subject: [PATCH] Modified to reset multitap index when MULTITAP timer expired Change-Id: I7c6464238e55e990611c17ebe4ea7eaf3766ffd7 --- scl/sclcontroller.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scl/sclcontroller.cpp b/scl/sclcontroller.cpp index b652ada..ea9d472 100644 --- a/scl/sclcontroller.cpp +++ b/scl/sclcontroller.cpp @@ -3574,6 +3574,24 @@ CSCLController::timer_event(const scl32 data) handler->on_event_key_clicked(key_event_desc); events->destroy_timer(id); + + /* We have to reset multitap button state when MULTITAP timer expired */ + sclboolean ended = FALSE; + sclwindow window = windows->get_nth_window_in_Z_order_list(SCL_WINDOW_Z_TOP); + for (int loop = 0;loop < MAX_KEY && !ended;loop++) { + SclButtonContext *button_context = cache->get_cur_button_context(window, loop); + if (button_context) { + if (!(button_context->used)) { + ended = TRUE; + } else { + const SclLayoutKeyCoordinate *coordinate = cache->get_cur_layout_key_coordinate(window, loop); + if (coordinate && coordinate->button_type == BUTTON_TYPE_MULTITAP) { + button_context->multitap_index = 0; + } + } + } + } + return FALSE; } break; -- 2.7.4