[java-atk-wrapper] Delegate addPropertyChangeListener call to EDT



commit 31c21d00ba4ffdbd0b22fcc52ff8354e3f0b40ab
Author: Giuseppe <giuseppecapaldo93 gmail com>
Date:   Mon Jun 17 21:17:52 2019 +0200

    Delegate addPropertyChangeListener call to EDT

 wrapper/org/GNOME/Accessibility/AtkWrapper.java.in | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in 
b/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
index 0af1773..128fb40 100644
--- a/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
+++ b/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
@@ -638,13 +638,9 @@ public class AtkWrapper {
   };
 
   public static void registerPropertyChangeListener(AccessibleContext ac) {
-    if (ac != null) {
-      try {
-        ac.addPropertyChangeListener(propertyChangeListener);
-      } catch (Exception e){
-        e.printStackTrace();
-      }
-    }
+        if (ac != null) {
+            AtkUtil.invokeInSwing( () -> { ac.addPropertyChangeListener(propertyChangeListener); } );
+        }
   }
 
   public native static boolean initNativeLibrary();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]