[BRLTTY] BRLTTY and AT-SPI

Samuel Thibault samuel.thibault at ens-lyon.org
Fri Aug 28 21:09:04 EDT 2015


Aura Kelloniemi, le Fri 28 Aug 2015 23:55:53 +0300, a écrit :
> - BRLTTY does not support copy/paste or cursor routing in its AT-SPI driver

Here is a patch which should fix copy/paste. Dave, here is a changelog:

“
Fix parameters of the GenerateKeyboardEvent RPC: the string has to be
non-NULL for UTF-8 verification, and key_type is unsigned.
”

Samuel
-------------- next part --------------
diff --git a/Drivers/Screen/AtSpi2/screen.c b/Drivers/Screen/AtSpi2/screen.c
index 4305213..b495720 100644
--- a/Drivers/Screen/AtSpi2/screen.c
+++ b/Drivers/Screen/AtSpi2/screen.c
@@ -997,12 +1005,12 @@ static int
 AtSpi2GenerateKeyboardEvent (dbus_uint32_t keysym, enum key_type_e key_type)
 {
   DBusMessage *msg, *reply;
-  char *s = NULL;
+  char *s = "";
 
   msg = new_method_call(SPI2_DBUS_INTERFACE_REG, SPI2_DBUS_PATH_DEC, SPI2_DBUS_INTERFACE_DEC, "GenerateKeyboardEvent");
   if (!msg)
     return 0;
-  dbus_message_append_args(msg, DBUS_TYPE_INT32, &keysym, DBUS_TYPE_STRING, &s, DBUS_TYPE_INT32, &key_type, DBUS_TYPE_INVALID);
+  dbus_message_append_args(msg, DBUS_TYPE_INT32, &keysym, DBUS_TYPE_STRING, &s, DBUS_TYPE_UINT32, &key_type, DBUS_TYPE_INVALID);
   reply = send_with_reply_and_block(bus, msg, 1000, "generating keyboard event");
   if (!reply)
     return 0;


More information about the BRLTTY mailing list