Always enforce focus stealing prevention (or drop "smart" mode)
I started looking into why applications would get focus for new windows, but not when an existing window was activated. I went down a rabbit hole to only discover that mutter has a gsettings property "focus-new-windows" that can be strict
or smart
(as default). AFAIU smart
means that new windows get focus and strict
means they get focus only when they are actually allowed to (using the correct startup sequence or xdg activation token, or be a "child" window of focus window).
Mutter uses focus stealing prevention, but currently all new MetaWindow
s are given focus without the need of a valid startup sequence or a xdg activation token. I think this some what defeats the point of having the focus stealing prevention. In addition, it confuses developers and it makes it harder to discover issues with window focus, since it seams to work but then it doesn't.
Xdg-activation is now pretty much stable and can be used by apps i think we should require it instead of introducing additional confusion by only requiring it in some cases.
Not having the additional(unknown) policies in the focus stealing prevention is a much better direction to fix the issue then disabling focus prevention all together (#673).