libaurum: Exception handling for idle listen already finished 23/294123/1 accepted/tizen/unified/20230615.060047
authorWoochan Lee <wc0917.lee@samsung.com>
Tue, 13 Jun 2023 10:36:24 +0000 (19:36 +0900)
committerWoochan Lee <wc0917.lee@samsung.com>
Tue, 13 Jun 2023 10:36:24 +0000 (19:36 +0900)
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

index 0eba532..8f294df 100644 (file)
@@ -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;