From: Inhong Han Date: Wed, 7 May 2025 23:34:17 +0000 (+0900) Subject: Allow repeated utterance of pressed button X-Git-Tag: accepted/tizen/unified/20250513.124553~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ef1da9ea74e47765208df6013383a87601fe0e7;p=platform%2Fcore%2Fuifw%2Flibscl-ui-nui.git Allow repeated utterance of pressed button Change-Id: I5212709fdbf70e10ff2a6a080d966af69a07a432 --- diff --git a/scl/sclcontroller.cpp b/scl/sclcontroller.cpp index af73029..840b938 100644 --- a/scl/sclcontroller.cpp +++ b/scl/sclcontroller.cpp @@ -1471,31 +1471,30 @@ CSCLController::process_button_over_event(sclwindow window, sclint x, sclint y, if (cur_context == NULL) { return FALSE; } - if (key_index != highlighted_key || window != highlighted_window) { - SECURE_LOGD("%d != %d || %p != %p", key_index, highlighted_key, window, highlighted_window); - if (layout) { - if (coordinate->key_type != KEY_TYPE_NONE) { - if (context->get_tts_enabled()) { - const sclchar *targetstr = coordinate->hint_string[shift_index][button_context->multitap_index]; - if (targetstr == NULL) { - targetstr = coordinate->label[shift_index][0]; - } - if (targetstr == NULL) { - targetstr = coordinate->key_value[shift_index][button_context->multitap_index]; - } - /*if(state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY || - state->get_cur_action_state() == ACTION_STATE_POPUP_LONGKEY ) { - targetstr = coordinate->long_key_value; - }*/ - const sclchar *sayit = cache->find_substituted_string(targetstr); - utils->play_tts(sayit); + + SECURE_LOGD("key_index(%d), highlighted_key(%d), window(%p), highlighted_window(%p)", key_index, highlighted_key, window, highlighted_window); + if (layout) { + if (coordinate->key_type != KEY_TYPE_NONE) { + if (context->get_tts_enabled()) { + const sclchar *targetstr = coordinate->hint_string[shift_index][button_context->multitap_index]; + if (targetstr == NULL) { + targetstr = coordinate->label[shift_index][0]; } + if (targetstr == NULL) { + targetstr = coordinate->key_value[shift_index][button_context->multitap_index]; + } + /*if(state->get_cur_action_state() == ACTION_STATE_BASE_LONGKEY || + state->get_cur_action_state() == ACTION_STATE_POPUP_LONGKEY ) { + targetstr = coordinate->long_key_value; + }*/ + const sclchar *sayit = cache->find_substituted_string(targetstr); + utils->play_tts(sayit); } } - - context->set_cur_highlighted_window(window); - context->set_cur_highlighted_key(key_index); } + + context->set_cur_highlighted_window(window); + context->set_cur_highlighted_key(key_index); } }