From 8ee4c4880d7ead36b146c0928b0f6e6722c6a297 Mon Sep 17 00:00:00 2001 From: Mark Doffman Date: Mon, 8 Jun 2009 11:39:51 +0100 Subject: [PATCH] 2009-06-08 Mark Doffman * pyatspi/accessiblecache.py Removing objects fix, incorrectly named variable. * pyatspi/base.py Enum comparison with None was not correct. * registryd/deviceeventcontroller.c Un-initialized dbus error in generate-mouse-event function. --- pyatspi/accessiblecache.py | 2 +- pyatspi/base.py | 2 ++ registryd/deviceeventcontroller.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyatspi/accessiblecache.py b/pyatspi/accessiblecache.py index 7d199e9..b190793 100644 --- a/pyatspi/accessiblecache.py +++ b/pyatspi/accessiblecache.py @@ -175,7 +175,7 @@ class AccessibleCache(object): for old, new in cache_update_objects: self._dispatch_event(old, new) - def _remove_object(self, paths): + def _remove_object(self, path): # TODO I'm squashing a possible error here # I've seen things appear to be deleted twice # which needs investigation diff --git a/pyatspi/base.py b/pyatspi/base.py index 607cf2f..7096d1b 100644 --- a/pyatspi/base.py +++ b/pyatspi/base.py @@ -47,6 +47,8 @@ class Enum(dbus.UInt32): return self._enum_lookup[int(self)] def __eq__(self, other): + if other is None: + return False if int(self) == int(other): return True else: diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c index 6b67e78..8049ab0 100644 --- a/registryd/deviceeventcontroller.c +++ b/registryd/deviceeventcontroller.c @@ -2485,6 +2485,7 @@ static DBusMessage * impl_generate_mouse_event (DBusConnection *bus, DBusMessage gboolean err = FALSE; Display *display = spi_get_display (); + dbus_error_init (&error); if (!dbus_message_get_args(message, &error, DBUS_TYPE_INT32, &x, DBUS_TYPE_INT32, &y, DBUS_TYPE_STRING, &eventName, DBUS_TYPE_INVALID)) { return droute_invalid_arguments_error (message); -- 2.7.4