Re: [g-a-devel] Focus - AT vs. mouse/keyboard manipulation

On Wed, 2006-08-16 at 19:45, Elijah Newren wrote:

Hi Elijah:

I appreciate the underlying logic behind the focus-stealing prevention,
and in particular the oft-cited case where focus moves out of a password
field during authentication.

It does however cause some serious problems for AT-SPI.

We basically cannot transfer timestamps with our doAction requests,

The best we can do, I think, is have the ATK implementation code (in
libgail) call gdk_x11_window_set_user_time() on the relevant toplevel. 
However, we have to get an appropriate timestamp from somewhere, and
unfortunately it cannot be gotten from AT-SPI.  So libgail has to
somehow obtain a timestamp for "the current time" when A(TK receives the
request. Unfortunately the canonical CURRENT_TIME macro in X11 is just
'0' which fails to solve the problem, I think.  Would the value returned
from gdk_x11_get_user_time() do the trick?


> This is a pretty good description of the behavior, but there are some
> pedantic clarifications I'd like to make (feel free to skip this
> paragraph if you just want to solve your problem ASAP instead of
> getting the verbose lecture):  The behavioral change was also intended
> to answer the question "how do we handle the fact that user actions
> are often far from instantaneous, and that users will continue issuing
> more actions instead of waiting for the first to be processed?"
> Indirect or non-user actions (e.g. Telsa sending an IM to Alan just as
> he's about to type his root password into some window, resulting in
> Alan accidentally IM'ing his root password back) was definitely a big
> part of the consideration, but that was actually considered a special
> case with a separate hint and handling for it.  It's just that, as a
> side-effect of the particular implementation we chose, a broad range
> of indirect interactions (e.g. the IM case) automatically worked
> without the additional hints.  But you are right that the AT-SPI
> actions are being lumped into the latter case because you haven't
> provided the WM sufficient hints to do otherwise.  This is actually
> very similar to another case:  single-instance application launches
> (where the second instance would request the first to open a window
> for it, and then the second instance would shut itself down) suffered
> from the same problem until they fixed the hints provided to the WM.
> Oh, and the other pedantic clarification -- this was introduced in the
> gnome-2.10 timeframe (well, developed during the gnome-2.6 timeframe,
> added in gnome-2.8, removed at the last minute because of insufficient
> support for the new spec, and then finally landed in gnome-2.10).
> > However, I believe that the AT-SPI Actions should probably be treated as
> > "user" actions even though they are technically 'programmatic' ones.  I
> > don't know whether new metacity or window-manager API would be required
> > to make this work, or not.  For this reason I am cross-posting your
> > message.
> No additional window manager API is required; it long since added all
> API you need -- you just need to use it (see below).  You may
> need/want new AT-SPI API, though.
> > Metacity folks: if an end-user of an assistive technology such as a
> > screen reader or onscreen keyboard invokes the "activate" action on a
> > button which opens a dialog, the desired behavior is for that dialog to
> > take focus, since it is being posted in response to an end-user action
> > (albeit indirectly).
> If it's a response to a direct user action (e.g. mouse button press on
> a button of the onscreen keyboard or such), then you have the
> timestamp of that user interaction.  If you just forward it to the
> other process, and have the other process call
> gdk_x11_window_set_user_time(gdk_window, timestamp) on the relevant
> window, then you're good to go.  (If you want to do this on a widget
> that hasn't been shown yet, you may be unable to obtain a gdk_window
> unless you first call gtk_widget_realize())
> > I am happy to annotate the AT-SPI docs to warn clients of the API that they
> > should not use the Action:doAction API except in response to direct end-user
> > requests.
> If it's not in response to a direct end-user request, just don't send
> a timestamp and do no updating of timestamps on the other end.  Then
> metacity will automatically treat it correctly.
> Hope that helps,
> Elijah
> _______________________________________________
> Gnome-accessibility-devel mailing list
> Gnome-accessibility-devel gnome org

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