I am aware of the above ICCCM spec and that Xmir doesn't follow it fully, but that's also possibly not the issue here. The issue with supporting the Locally Active focus model is that apps want the ability to either focus their popups explicitly or not at all:
In both cases the shell must not implicitly change the focus while the user is interacting with Firefox, but Mir/Unity8 is doing just that. And the unfocus event on the Firefox main window is tricking Firefox into closing the popup (and menus) immediately.
So we apparently have no way out other than to ensure that the SHELL does not ever focus certain popups (as chosen by the toolkit). Xmir already has all the information it needs to make this decision and is only lacking a Mir client API to communicate it to the shell.
Fortunately our Unity8 WM design already provides means for us to do this, and we have not yet implemented it in Mir (comments 16-17).
Also remember that Xmir ignoring focus/unfocus events to work around such bugs is unacceptable, because that leads to the OSK either not appearing or never disappearing.
I am aware of the above ICCCM spec and that Xmir doesn't follow it fully, but that's also possibly not the issue here. The issue with supporting the Locally Active focus model is that apps want the ability to either focus their popups explicitly or not at all:
https:/ /tronche. com/gui/ x/icccm/ sec-4.html# s-4.1.10
In both cases the shell must not implicitly change the focus while the user is interacting with Firefox, but Mir/Unity8 is doing just that. And the unfocus event on the Firefox main window is tricking Firefox into closing the popup (and menus) immediately.
So we apparently have no way out other than to ensure that the SHELL does not ever focus certain popups (as chosen by the toolkit). Xmir already has all the information it needs to make this decision and is only lacking a Mir client API to communicate it to the shell.
Fortunately our Unity8 WM design already provides means for us to do this, and we have not yet implemented it in Mir (comments 16-17).
Also remember that Xmir ignoring focus/unfocus events to work around such bugs is unacceptable, because that leads to the OSK either not appearing or never disappearing.