From 982801a13e1ee3f1d632ef57b5a78e2aad889988 Mon Sep 17 00:00:00 2001 From: Woochan Lee Date: Tue, 13 Jun 2023 19:36:24 +0900 Subject: [PATCH] libaurum: Exception handling for idle listen already finished If event listening loop already finished the idle flag will changed to READY We need to keep READY status for other event listening. Change-Id: Ida65b41cfadce3caf8b3d2253a57f93eeb60e99e --- libaurum/src/Impl/Accessibility/AtspiAccessibleWatcher.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libaurum/src/Impl/Accessibility/AtspiAccessibleWatcher.cc b/libaurum/src/Impl/Accessibility/AtspiAccessibleWatcher.cc index 0eba532..8f294df 100644 --- a/libaurum/src/Impl/Accessibility/AtspiAccessibleWatcher.cc +++ b/libaurum/src/Impl/Accessibility/AtspiAccessibleWatcher.cc @@ -233,7 +233,8 @@ gpointer AtspiAccessibleWatcher::timerThread(gpointer data) // instead of waiting specific time if (((std::chrono::system_clock::now() - mStartTime) > std::chrono::milliseconds{WAIT_FOR_IDLE_MILLI_SEC}) || - (mRenderCount == 0)) + (mRenderCount == 0) || + (isIdle == IdleEventState::IDLE_LISTEN_READY)) { break; } @@ -242,7 +243,8 @@ gpointer AtspiAccessibleWatcher::timerThread(gpointer data) } mTimerThread = nullptr; - isIdle = IdleEventState::IDLE_LISTEN_DONE; + if (isIdle != IdleEventState::IDLE_LISTEN_READY) + isIdle = IdleEventState::IDLE_LISTEN_DONE; g_thread_exit(NULL); return NULL; -- 2.7.4