[caribou] daemon: Use Atspi's main loop instead of GLib's



commit e94ae8496c616124e0ce61c9b5813b77f87451f5
Author: Daiki Ueno <dueno src gnome org>
Date:   Tue Feb 3 18:22:41 2015 +0900

    daemon: Use Atspi's main loop instead of GLib's
    
    To enable D-Bus property caching in libatspi, the client must call
    atspi_event_main.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=743267

 daemon/daemon.vala |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/daemon/daemon.vala b/daemon/daemon.vala
index ee99f34..a8a2616 100644
--- a/daemon/daemon.vala
+++ b/daemon/daemon.vala
@@ -17,7 +17,6 @@ namespace Caribou {
         Atspi.Accessible current_acc;
         unowned Gdk.Display display;
         uint name_id;
-        GLib.MainLoop main_loop;
 
         public Daemon () {
             display = Gdk.Display.get_default ();
@@ -26,7 +25,6 @@ namespace Caribou {
                                     BusNameOwnerFlags.ALLOW_REPLACEMENT
                                     | BusNameOwnerFlags.REPLACE,
                                     on_bus_acquired, null, quit);
-            main_loop = new GLib.MainLoop ();
         }
 
         ~Daemon () {
@@ -174,7 +172,9 @@ namespace Caribou {
                                             0,
                                             null,
                                             on_get_proxy_ready);
-            main_loop.run ();
+            // Use Atspi.Event.{main,quit}, instead of GLib.MainLoop
+            // to enable property caching in libatspi.
+            Atspi.Event.main ();
         }
 
         public void quit () {
@@ -193,7 +193,7 @@ namespace Caribou {
                 keyboard = null;
             }
 
-            main_loop.quit ();
+            Atspi.Event.quit ();
         }
     }
 }


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