Re: AT-SPI standard's management of text objects



On Sun, Nov 20, 2016 at 06:48:13PM +0100, Samuel Thibault wrote:
Samuel Thibault, on Sun 20 Nov 2016 18:35:41 +0100, wrote:
Ksamak, on Wed 16 Nov 2016 09:32:20 +0100, wrote:
On Tue, Nov 15, 2016 at 07:49:00PM +0100, Samuel Thibault wrote:
Ksamak, on Tue 15 Nov 2016 16:52:51 +0100, wrote:
When caret is on a newline, it is quite hard to get the
screen position of the newline caret, The function atspi_text_get_character_extents
is of no help, and returns 0,0 as coordinates when such offset is
provided.

This looks like a bug to me.

Could you provide a specific example how to reproduce the issue?

Another similar problem is when a text is empty, thereby no text
offset is present.

Ditto?

(I believe it's probably just a behavior of pango which shows up here,
not anything really wanted by AT-SPI.  I however don't know how to
reproduce the issue you are encountering).

I'm using libatspi, versions from jessie to sid, and I tried upgrading
libpango to sid too.
I'm using the "atspi_text_get_character_extents" function from libatspi:
AtspiRect *size = atspi_text_get_character_extents(text, event->detail1, ATSPI_COORD_TYPE_SCREEN, NULL);

I'm using it with a listener like so:
atspi_event_listener_register (listener, "object:text-caret-moved", NULL)

Problem occurs when (any) text entry is empty, or when the line or
paragraph is empty.
When clicking on a text entry (firefox), atspi emits two events:
- one event that focuses the paragraph
- one event for the caret, for which the extent is that of the full
  paragraph width/height.

hope that helps
-- 
Ksamak
Free software hacktivist

Attachment: pgpZy4dViXjfo.pgp
Description: PGP signature



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