libaurum: apply cache clear when element is updated. 86/260586/2
authorHosang Kim <hosang12.kim@samsung.com>
Tue, 29 Jun 2021 10:47:07 +0000 (19:47 +0900)
committerwoochan lee <wc0917.lee@samsung.com>
Wed, 30 Jun 2021 11:02:08 +0000 (11:02 +0000)
Change-Id: Iac3a6c2811ac36237456b55792e634103f4f9b8d

libaurum/inc/Impl/Accessibility/AtspiWrapper.h
libaurum/src/Impl/Accessibility/AtspiAccessibleNode.cc
libaurum/src/Impl/Accessibility/AtspiWrapper.cc

index beac01aa9b7c18a47a3cf08c360f0d69b7630c97..0bebabca5a095e97f5318373b3e3c2b85505be56 100644 (file)
@@ -26,10 +26,11 @@ public:
     static gboolean Atspi_editable_text_delete_text(AtspiEditableText*, int start, int end, GError **error);
     static gboolean Atspi_editable_text_insert_text(AtspiEditableText*, int pos, const gchar *text, int len, GError **error);
     static AtspiAccessible* Atspi_accessible_get_application (AtspiAccessible *node, GError **error);
+    static void Atspi_accessible_clear_cache (AtspiAccessible *node);
 
     static void lock();
     static void unlock();
 private:
     static std::recursive_mutex mMutex;
     //static std::unique_lock<std::mutex> mLock;
-};
\ No newline at end of file
+};
index a918fd60ff34f947bdc8cb3046f5d400e35340e7..c9d7259b03dab891be1c74ff4fc1263810551ae0 100644 (file)
@@ -155,6 +155,9 @@ void* AtspiAccessibleNode::getRawHandler(void) const
 void AtspiAccessibleNode::refresh()
 {
     AtspiWrapper::lock();
+
+    AtspiWrapper::Atspi_accessible_clear_cache(mNode);
+
     if (isValid()) {
         gchar *rolename = AtspiWrapper::Atspi_accessible_get_role_name(mNode, NULL);
         if (rolename) {
index 308b9af65203d0466377435481d8b7542cf8e665..69e47c645cd4fd883150bd07517d8b342d920591 100644 (file)
@@ -135,6 +135,11 @@ AtspiAccessible* AtspiWrapper::Atspi_accessible_get_application (AtspiAccessible
     return atspi_accessible_get_application(node, error);
 }
 
+void AtspiWrapper::Atspi_accessible_clear_cache (AtspiAccessible *node)
+{
+    std::unique_lock<std::recursive_mutex> lock(mMutex);
+    return atspi_accessible_clear_cache(node);
+}
 void AtspiWrapper::lock()
 {
     mMutex.lock();