what we need from X (was Re: Wayland)



Hi Alan, thanks for your mail, and sorry for the delay in my answer, I
have been doing some research.

On 05/07/2012 04:22 PM, Alan Coopersmith wrote:
> On 05/ 7/12 03:35 AM, Piñeiro wrote:
>> One of the current problems big problems is related to key events. In a
>> short, as XEvIE is dead, we can't track key events directly from X
>> server, so we are doing a key snooping on the application, and
>> forwarding it via DBUS. This is not really performant, can have some
>> collateral effects, and is the only remaining thing that makes X not
>> really transparent to ATK.
> BTW, from the X.Org developer point of view, one of the reasons we let
> XEvIE die was because it didn't seem like anyone required it, or even
> really noticed that it had been broken for a couple releases before the
> removal.   If there are requirements from X or Wayland that are going
> unmet, step 1 is letting the developers of those systems know.
>

Well, I was not here when XEvIE was born or was let to die, so probably
the info that I have is incomplete. As I was told, XEvIE was not let die
because nobody required it, but because was maintainerless. In fact,
Daniel Stone mentioned that was somewhat broken since day 1 (see his
comment at the end of my post here [2]). Googling a little, I found this
interesting mail [4] (also written by you). And it seems that main
consumer of XEvIE was gok (in fact, AFAIK, just one app could use XEvIE
at the same time, so at-spi was being used as a kind of wrapper).

Register to global key events on ATK based on server-side key snooping
was added since the beginning at 2001. XEvIE support on at-spi was added
on 2003, and mainly to be used by gok. So I assume (please see my
previous "probably the info that I have is incomplete", correct me if
I'm wrong), that the problem was that XEvIE was hard to maintain (or at
least not really maintained), and the main functionality required was
provided by key snooping on ATK (as Orca was well maintained, gok was
deprecated, and Caribou seems to no require it (yet)). So taking into
account the low amount of resources of the accessibility team, the
conclusion is that live without XEvIE was, not fine, but assumable.

Having said so, I think that we need something like XEvIE. Not the
package, but the functionality, or part of it. As I'm not an X expert, I
can't tell if what X provides now is enough. So after take a look to
what we have on at-spi2-core:
  * In order to implement atspi_register_device_event_listener:
    * Listen Mouse movement events: calling XQueryPointer on a idle call
(this sounds somewhat hacky and intrusive)
  * In order to implement atspi_generate_mouse_event
    * Generate Mouse events with  XTestFakeRelativeMotionEvent,
XTestFakeButtonEvent, etc
  * In order to implement atspi_register_keystroke_listener:
    * key snooping on the server side (ATK or Qt)
  * In order to implement atspi_generate_keyboard_event:
    * Generate key event with XTestFakeKeyEvent

Additionally, in this research I found that right now
atspi_register_device_event_listener only works with mouse events
(improve documentation required). As part of the implementation of this
listener I found a process to get and filter events (on event-source.c)
based on XPending, XNextEvent and XFilterEvent. So I'm not sure if this
could be applied to also listen to key events.

At this moment the priority is getting rid of the server-side
(application-side) key snooping in order to forward key events. So Alan
(or anyone reading), do you think that this could be achievable with X
but without XEviE (Daniel Stone seems to discourage that on my post
comment [2])?

PD: Having said so, X event management in at-spi (and AFAIS in general)
is somewhat messy. For example, as at-spi2 started as a C&P of at-spi
there are still code related with XEviE in spite that since the
beginning was said that it should be removed [5]

[1] https://bugzilla.gnome.org/show_bug.cgi?id=649559#c2
[2]
http://blogs.igalia.com/apinheiro/2012/01/19/atkat-spi2-hackfest-2012-day-1/
[3]
http://mail.opensolaris.org/pipermail/accessibility-discuss/2010-April/000185.html
[4] https://live.gnome.org/Gok
[5]
http://www.linuxfoundation.org/collaborate/workgroups/accessibility/atk/at-spi/at-spi_on_d-bus

-- 
Alejandro Piñeiro Iglesias



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