Bug 419937 - Krunner does not get focus when the "Focus stealing prevention" is set to "Extreme"
Summary: Krunner does not get focus when the "Focus stealing prevention" is set to "Ex...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.18.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 416319 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-04-11 01:41 UTC by Xu Zhao
Modified: 2021-06-14 02:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xu Zhao 2020-04-11 01:41:37 UTC
SUMMARY
KRunner or the window launched by krunner does not correctly get focus when the "Focus Stealing Prevention" setting is set to "Extreme" or "High"

STEPS TO REPRODUCE
1. Open Window Focus Behavior, set "Focus Stealing Prevention" to "Extreme". Click Apply. (Now the focus is on the "Window Focus Behavior" window)
2. Use Alt-F2 to call out krunner
3. Krunner doesn't get focus. If you start an application using krunner (e.g., konsole), the new application window doesn't get focus, either. 

OBSERVED RESULT
KRunner, or the application started by the krunner should get the focus.

EXPECTED RESULT
The focus remains to be on the old application.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed 20200408
KDE Plasma Version: Plasma 5.18.4
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION

Not sure whether this is desired behavior or a bug. Please let me know what you think.
Comment 1 Xu Zhao 2020-04-11 01:42:23 UTC
*** Bug 416319 has been marked as a duplicate of this bug. ***
Comment 2 Xu Zhao 2020-07-05 01:09:21 UTC
Can anyone please check if they could reproduce this bug?
Comment 3 Patrick Silva 2021-06-13 19:16:58 UTC
Tested with Plasma 5.22 on Arch Linux.
krunner is focused, but konsole launched with it opens in background.
Comment 4 Xu Zhao 2021-06-14 02:17:15 UTC
(In reply to Patrick Silva from comment #3)
> Tested with Plasma 5.22 on Arch Linux.
> krunner is focused, but konsole launched with it opens in background.

Thanks for the test. I have tried again in 5.22, and the behavior is the same as yours. The original bug has disappeared. I think now this is the correct behavior (new application open in background) because the option specifies to prevent the new application from stealing the focus.

Therefore, I am closing this bug report. Please feel free to reopen the bug if you disagree.