[at-spi2-core] Send key events to listeners assumed to be hung, but don't block
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Send key events to listeners assumed to be hung, but don't block
- Date: Fri, 24 Feb 2012 22:23:56 +0000 (UTC)
commit 2cf16b3ec3777d1337e02d6a7850290a259eda5b
Author: Mike Gorse <mgorse novell com>
Date: Fri Feb 24 16:22:50 2012 -0600
Send key events to listeners assumed to be hung, but don't block
Orca would sometimes fail to notice that its modifier key was released
since it was presumed to be hung and would not be sent the event. So,
rather than ignore event listeners assumed to be hung, we'll send them
the notifications for the keys that they're listening to but not wait
for a reply, instead assuming that they are not consumed.
registryd/deviceeventcontroller.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c
index 8637b2c..93ee40d 100644
--- a/registryd/deviceeventcontroller.c
+++ b/registryd/deviceeventcontroller.c
@@ -1224,19 +1224,27 @@ Accessibility_DeviceEventListener_NotifyEvent(SpiDEController *controller,
DBusError error;
dbus_bool_t consumed = FALSE;
GSList *l;
+ gboolean hung = FALSE;
for (l = hung_processes; l; l = l->next)
{
if (!strcmp (l->data, listener->bus_name))
{
- dbus_message_unref (message);
- return FALSE;
+ dbus_message_set_no_reply (message, TRUE);
+ hung = TRUE;
+ break;
}
}
dbus_error_init(&error);
if (spi_dbus_marshal_deviceEvent(message, key_event))
{
+ if (hung)
+ {
+ dbus_connection_send (controller->bus, message, NULL);
+ dbus_message_unref (message);
+ return FALSE;
+ }
DBusMessage *reply = send_and_allow_reentry (controller->bus, message, 1000, &error);
if (reply)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]