You click a link in your chat app, your browser with a hundred tabs comes to the front and opens that page. How hard can it be? Well, you probably know by now that Wayland, unlike X, doesn’t let one application force its idiot wishes on everyone else. In order for an application to bring its window to the front, it needs to make use of the XDG Activation protocol.
In essence, an application cannot take focus, it can only receive focus. In the example above, your chat app would request an XDG Activation token from the compositor. It then asks the system to open the given URL (typically launching the web browser) and sends along the token. The browser can then use this token to activate its window.
↫ Kai Uwe
After explaining exactly how this mechanism works, KDE developer Kai Uwe details the issue that not every application yet properly supports the XDG Activation protocol, and some that do have bugs that, say, might make an application discard its token too early. In other words, it’s time to start testing.
You’ll need to use the latest git master brach of KWin, and enable set the “Focus Stealing Prevention” option in Window Management to “Extreme”. When set to “Extreme”, KWin will exclusively activate windows that request activation with a valid token. They’ve already found and fixed a number of issues in KDE using this method, but more are bound to found, particularly in third-party applications.
They’re planning on turning on KWin’s focus stealing prevention on Wayland with forgiving settings at first, but increase the strictness of the feature as time progresses and issues are fixed.
I’m pretty sure it’ll be a good way to steal you password from the background without you knowing 🙂
As opposed to something like having an IM client slam to the foreground as you’re typing a password, so you end up sending what you were trying to type into `sudo` to a random friend? That’s almost happened to me on multiple occasions before I cranked up focus-stealing prevention and manually set Window Rules exclusions for things like my Win+Space application launcher.
Besides, it’s focus-stealing prevention, not showing prevention. KWin is perfectly free to raise such a window to just behind and peeking out from what you’re typing into when the application sends the “needs attention” signal that flashes the taskbar button.
That is not only an ugly effect, but a clear show of wasting computer resources for doing it. There is a reason the Aqua UI from OSX was dropped in favor or non-translucent and simpler UI in the end.
That said, if THIS is current-day Apple innovating, they are doomed.
Wrong tab, sorry. I could not find a way to delete the comment 🙁