Allow repeated utterance of pressed button 18/323818/1
authorInhong Han <inhong1.han@samsung.com>
Wed, 7 May 2025 23:34:17 +0000 (08:34 +0900)
committerInhong Han <inhong1.han@samsung.com>
Wed, 7 May 2025 23:34:17 +0000 (08:34 +0900)
Change-Id: I5212709fdbf70e10ff2a6a080d966af69a07a432

scl/sclcontroller.cpp

index af7302906a2f5fbe809ac6e516fbf70209740d42..840b9389710f7a922a1b9281e84b697bd86e4b12 100644 (file)
@@ -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);
         }
     }