From: Lukasz Oleksak Date: Mon, 16 Jan 2023 11:47:34 +0000 (+0100) Subject: Disable default label when old context root object became new context current object X-Git-Tag: submit/tizen_6.5/20230127.015228^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_6.5;p=platform%2Fcore%2Faccessibility%2Fscreen-reader.git Disable default label when old context root object became new context current object Change-Id: I8852a8c53181039b8a2c4a3be1a2373cfcdd0b14 --- diff --git a/src/navigator.c b/src/navigator.c index 3f67adb9..a524fde9 100644 --- a/src/navigator.c +++ b/src/navigator.c @@ -2589,15 +2589,23 @@ TIZEN_PROD_STATIC void _view_content_changed(AtspiAccessible *root, AtspiRole ro return; } - if (default_label_enabled) { - _current_highlight_object_set(nd, NULL, HIGHLIGHT_FIRST); - } else - DEBUG("Current window(%p) does not support default label", root); - + AtspiAccessible *old_root = g_object_ref(flat_navi_context_root_get(nd->flat_navi_context)); if (flat_navi_context_setup(nd->flat_navi_context, root)) { DEBUG("END -- setup failed"); + g_object_unref(old_root); return; } + AtspiAccessible *new_current = flat_navi_context_current_get(nd->flat_navi_context); + if (atspi_accessible_is_equal(old_root, new_current)) { + // when returning to old context root as current in new context we should highlight the current immediately without providing default label + default_label_enabled = EINA_FALSE; + } + g_object_unref(old_root); + + if (default_label_enabled) { + _current_highlight_object_set(nd, NULL, HIGHLIGHT_FIRST); + } else if (new_current) + _current_highlight_object_set(nd, new_current, HIGHLIGHT_FIRST); tw_purge(EINA_TRUE);