Bug 458978

Summary: Focus stealing prevention setting makes no sense on Wayland
Product: [Applications] systemsettings Reporter: Nicolas Fella <nicolas.fella>
Component: kcm_kwinoptionsAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: liamdawe, linux, nate, plasma-bugs, unblended_icing552
Priority: NOR Keywords: usability, wayland
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=457007
https://bugs.kde.org/show_bug.cgi?id=364689
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nicolas Fella 2022-09-10 20:56:36 UTC
Focus stealing prevention is an inherently X11-thing. On Wayland applications can't steal focus by default and can only raise themselves in controlled circumstances.

Therefore the focus stealing prevention combobox in the window behavior settings makes no sense on Wayland in its current form.
Comment 1 Nate Graham 2022-09-13 18:32:44 UTC
Yeah, we should hide this section on Wayland I guess.
Comment 2 Bernd Steinhauser 2023-03-12 08:51:59 UTC
(In reply to Nicolas Fella from comment #0)
> Focus stealing prevention is an inherently X11-thing. On Wayland
> applications can't steal focus by default and can only raise themselves in
> controlled circumstances.
> 
> Therefore the focus stealing prevention combobox in the window behavior
> settings makes no sense on Wayland in its current form.

So how to prevent something from stealing focus?

Years ago I opened this bug about the device notifier and there I was told to use focus stealing prevention if I don't want the notifier to steal focus when I plug in e.g. a usb drive.
https://bugs.kde.org/show_bug.cgi?id=354309
Now this doesn't work anymore and – for me – it's still a highly annoying thing, because I regularly use a USB drive that I can't mount using solid/udisks; I have to (and want to) do it via shell.

At least – in favor of the argument in the other bugs – nowadays you can do something with the keyboard in the device notifier, so kudos for that.
Comment 3 unblended_icing552 2024-02-10 10:13:44 UTC
I would say in the context of bug 364689 this option still makes sense. It might not make sense at its current form technical wise, but it does make sense when "focus stealing prevention when typing" becomes a thing (and such thing already exists on Windows and GNOME).

Besides, this option still affects XWayland window for now.
Comment 4 Nate Graham 2024-07-26 17:17:04 UTC
*** Bug 490853 has been marked as a duplicate of this bug. ***