[BLOCKED] Applications not presented after focus enters and leaves window-manager-shortcut launched window in Gtk 3.23
Hello,
Some background first:
- it has been previously reported that when typing a Window Manager shortcut, orca reannounces the window
- that is because of the way shortcuts work on X and gtk's behavior: the WM takes a keyboard grab, and gtk would in that case disable its window, leading to a window:deactivate event sent to atspi, and window:activate again when then keyboard shortcut is finished.
- the gtk behavior was fixed in gtk#85 so that shortcuts do not make gtk applications emit window:deactivate/activate
but it happens that opening the MATE Applications menu with the alt-f1 shortcut is a WM shortcut. And thus the application being interrupted doesn't emit window:activate/deactivate around the menu browsing.
I guess Orca then assumes that the application actually lost the focus, and the menu did acquire it, and when closing the menu, no application has the focus, and orca will thus ignore what is happening in the application, and thus we don't have review any more, until some focus event which eventually makes orca think after all that the application got the focus back.
So the problem here is that the shortcut does open a temporary window, which Orca doesn't know is just a temporary window for the shortcut.
We could perhaps make Orca actually remember the window:activate/deactivate status for each application, so that when there is only one application which didn't send window:deactivate, orca knows that it has the focus. I however guess that Orca doesn't do such thing because it might happen that an application misses sending window:deactivate?
Another way would be for the MATE WM to somehow mark the Application menu window as a shortcut window, so that Orca knows that in that case yes, it should pile window:activate/deactivate, because the currently-running application is still active WM-wise, even if it is temporarily not what Orca is reviewing.
Any opinion? :)