Open System Settings > Window Management > Window Behavior > Focus.
In the dropdown menu "Focus stealing prevention", select the level you want.
-
None: Prevention is turned off and new windows always become activated. -
Low: Prevention is enabled; when some window does not have support for the underlying mechanism and KWin cannot reliably decide whether to activate the window or not, it will be activated. This setting may have both worse and better results than the medium level, depending on the applications. -
Medium: Prevention is enabled. -
High: New windows get activated only if no window is currently active or if they belong to the currently active application. This setting is probably not really usable when not using mouse focus policy. -
Extreme: All windows must be explicitly activated by the user.

Reference
https://docs.kde.org/stable_kf6/en/kwin/kcontrol/windowbehaviour/index.html#focus
Comments