After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685621 - object state-changed:selected not raised and no accessible name displayed when alt+esc pressed
object state-changed:selected not raised and no accessible name displayed whe...
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 685472 (view as bug list)
Depends on: 671937
Blocks:
 
 
Reported: 2012-10-06 17:40 UTC by Beth Hadley
Modified: 2014-12-29 06:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample output from script (3.08 KB, text/plain)
2012-10-06 17:40 UTC, Beth Hadley
  Details
the listener script (720 bytes, text/x-python-script)
2012-10-06 17:41 UTC, Beth Hadley
  Details
Proof of concept patch (2.71 KB, patch)
2012-10-08 22:27 UTC, Alejandro Piñeiro Iglesias (IRC: infapi00)
none Details | Review

Description Beth Hadley 2012-10-06 17:40:37 UTC
Created attachment 225948 [details]
Sample output from script

When the key sequence alt+esc is used to cycle between windows, there are state-changed event issues. This causes a problem with orca.

When the key sequence alt+esc is pressed:

1) the event object:state-changed:showing is raised, but this is not ideal. It would be better if object:state-changed: selected were to be raised (just like what happens when alt+tab is pressed)
2) Currently, the object:state-changed:showing has role "panel" (but this is too generic),
3) This event must present the title through the accessible name.

Attached is the event listener script that indicates that when alt+esc is pressed, and object:state-changed:showing is raised with no "panel" name. Also attached is the output from our sample tests of this bugs.
Comment 1 Beth Hadley 2012-10-06 17:41:48 UTC
Created attachment 225949 [details]
the listener script
Comment 2 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-10-06 18:50:31 UTC
*** Bug 685472 has been marked as a duplicate of this bug. ***
Comment 3 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-10-06 18:55:08 UTC
(In reply to comment #0)

> 1) the event object:state-changed:showing is raised, but this is not ideal. It
> would be better if object:state-changed: selected were to be raised (just like
> what happens when alt+tab is pressed)

I will look if there is a way to emit that event.

> 2) Currently, the object:state-changed:showing has role "panel" (but this is
> too generic),

As you are saying that panel role is too generic, any suggestion about the role to be used?

> 3) This event must present the title through the accessible name.

ok.

> Attached is the event listener script that indicates that when alt+esc is
> pressed, and object:state-changed:showing is raised with no "panel" name. Also
> attached is the output from our sample tests of this bugs.

I think that I don't fully understand this paragraph. Specifically "is raised with no "panel" name". Seems to suggest that the role is not there. Reading 2 I understand that the role is panel. Do you mean "is raised with "panel" role but without name"?
Comment 4 Joanmarie Diggs (IRC: joanie) 2012-10-07 20:07:14 UTC
(In reply to comment #3)
 
> As you are saying that panel role is too generic, any suggestion about the role
> to be used?

Yes, panel is too generic.

In terms of an alternative role, as we were discussing at the Summit, how about role window since alt+esc is cycling through / selecting amongst windows.
 
> Do you mean "is raised with "panel" role but without name"?

Yes.
Comment 5 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-10-08 22:27:25 UTC
Created attachment 226085 [details] [review]
Proof of concept patch

This is a temptative patch that solves the three missing stuff mentioned at comment 0. In the end it is not a gnome-shell bug, but a mutter bug. GNOME Shell doesn't do that anything in relation with the cycle-windows keybindings.

I basically added accessibility information to the mutter object MetaWindowActor. I didn't create an custom accesssibility object subclass, as it would be an overkill. I just used atk API

About the role, I set it to ATK_ROLE_WINDOW, as suggested at comment 4. Taking into account that the object itself is called MetaWindowActor, it fits really well.

The title was also easy. The MetaWindow associated to this MetaWindowActor has a method _get_title, so I just used it as the name.

The tricky part is about the event emission. I was waiting for a kind of flag on MetaWindowActor pointing when to draw the outline, so emitting the selection event would be as easy as tracking that flag. But as Jasper pointed to me, the outline is draw at tabPopup.c A custom mutter tabpopup is created on the handle to cycle-windows keybinding, specifically at do_choose_window. And the outline is drawn externally. For me the easiest place to send that atk-selected event is when the window is raised (I added a callback to the property notification). At some sense, they keybinding management code is using meta_window_raise as a way to do the same thing. Anyway, not sure if this is the proper place to do that.

After some first provisional tests with Orca, this seems to work.

Having said so. Jasper also mentioned that Alt+Esc is somewhat broken and that the people are not really happy with it. Also mentioned that drop this feature is a possibility. Taking that into account not sure if it is worth to add the accessibility support for that feature.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-10-08 22:46:03 UTC
(In reply to comment #5)
> Having said so. Jasper also mentioned that Alt+Esc is somewhat broken and that
> the people are not really happy with it. Also mentioned that drop this feature
> is a possibility. Taking that into account not sure if it is worth to add the
> accessibility support for that feature.

Apologies. I went back and double-checked and the actual reply was to move the code from GTK+ painting to being in the compositor.

See: https://bugzilla.gnome.org/show_bug.cgi?id=671937
Comment 7 Alejandro Piñeiro Iglesias (IRC: infapi00) 2012-10-09 02:12:19 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Having said so. Jasper also mentioned that Alt+Esc is somewhat broken and that
> > the people are not really happy with it. Also mentioned that drop this feature
> > is a possibility. Taking that into account not sure if it is worth to add the
> > accessibility support for that feature.
> 
> Apologies. I went back and double-checked and the actual reply was to move the
> code from GTK+ painting to being in the compositor.
> 
> See: https://bugzilla.gnome.org/show_bug.cgi?id=671937

Interesting lecture. That "something like meta_window_actor_set_highlighted" method proposed by Owen Taylor at bug 671937 comment 10 is more or less that "kind of flag on MetaWindowActor" that I mentioned at comment 5 I like to have. With that kind of method, knowing when a window is selected or when to emit that the window get selected would be trivial. Basically if a window is highlighted it is selected. And as Owen said, that would be also avoid stacking order issues. On the patch I uploaded at comment 5, I'm implying that any window raised on the stack is selected, when this is debatable as a general rule.

So taking into account that how and when the windows under a cycle-window is highlighted is being refined at that bug, and could change, I think that it would be safer to wait until that bug got solved.

So adding a dependency with that bug.
Comment 8 Jose Vilmar Estacio de Souza 2012-12-17 13:52:11 UTC
The same thing happens when using alt + f6 to navigate between the windows of an application. Orca is muted and only announces the name of the window when we release the alt key.
Comment 9 Jasper St. Pierre (not reading bugmail) 2014-12-29 06:56:30 UTC
Alt+Esc doesn't exist anymore.