Comment 20 for bug 1625846

Revision history for this message
Chris Halse Rogers (raof) wrote :

I think bug 1671771 is fundamentally the wrong solution (to this problem; it does need to be fixed).

The problem here is that XMir is not behaving like a spec-compliant X11 window manager. Unless we want to require Mir servers to implement X11 window management, this is not something that we can do with extra Mir support.

One relevant section of one of the relevant X11 protocols is https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7

Specifically - Firefox is using the Locally Active focus model. It has the focus attribute set to “true” in the WM_HINTS, and has set WM_TAKE_FOCUS on its window.

This means that it (a) expects to receive focus (and receives focus in/focus out events) but (b) only ever expects to be given focus to its top-level window, and will manually manage the focus of its subwindows itself.

XMir is in a position to do this - it doesn't matter which of the client's windows Mir thinks has input focus. As long as *any* of the client's windows have input focus XMir will receive input events and can set the X11 focus as appropriate.