Compare commits

...

1 Commits

Author SHA1 Message Date
Matthias Clasen
447b997259 a11y: try to fix this one more time
This api is really unfortunate. The interpretation
of start, end and text seems semi-random :(
2023-10-11 10:04:48 -04:00

View File

@@ -705,9 +705,16 @@ emit_text_changed (GtkAtSpiContext *self,
int end,
const char *text)
{
char *copy;
if (self->connection == NULL)
return;
if (end < 0)
copy = g_strdup (text);
else
copy = g_strndup (text, end);
g_dbus_connection_emit_signal (self->connection,
NULL,
self->context_path,
@@ -715,7 +722,7 @@ emit_text_changed (GtkAtSpiContext *self,
"TextChanged",
g_variant_new ("(siiva{sv})",
kind, start, end,
g_variant_new_take_string (g_strndup (text, end)),
g_variant_new_take_string (copy),
NULL),
NULL);
}