Skip to content

Prevent app switcher speech from getting interrupted unexpectedly

This prevents the default window:deactivate handler from stopping the app switcher speech. It happens because as the switcher doesn't get "activated" and the window:deactivate thinks it is interrupting its own speech. Work around that by removing the locus of focus so that the window:deactivate handler doesn't think it owns the focus.


It is quite easy to reproduce: with either Compiz or Metacity as WM, open e.g. Pluma then Firefox. From Firefox, hit Alt+Tab (which should propose to switch to Pluma, previously focused app). Don't release Alt: you'll hear that Orca tries to start announcing the Pluma window title, but is cut right off. Well, actually sometimes it's cut so early that you don't even have a chance to hear anything.

Yes, I know what I have here is kind of a hack. Not sure what the Grand solution would be (a window:activate from the switcher? :S), but given that it's a switcher, and that there's already a totally specific handling mostly coming from the fact this is a very special window, I think it's worth doing something here at least for the moment.

BTW, we're using this for a few weeks and it didn't break anything we can tell.

CC @alexarnaud.

Merge request reports