Bug 324845

Summary: keyboard focus stealing by new popup dialog window
Product: [Plasma] kwin Reporter: Diggory Hardy <kde2>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: 4.11.1   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Diggory Hardy 2013-09-12 16:08:49 UTC
If the title doesn't explain it properly: sometimes while I'm typing a dialog pops up unexpectedly (e.g. one of Amarok's "missing plugin" things or a crash notifier or kwallet requesting a password), and whatever I'm typing goes to the new window (sometimes including <enter> which dismisses the window). This has happened to me several times in the last few weeks so it's not a rare theoretical case.

This is partially related, but less general (about passwords): https://bugs.kde.org/show_bug.cgi?id=141267
(i.e. fixing this bug will probably fix that too, but not necessarily vice-versa).

I don't know the best solution, but I can suggest a few options:

*   give new windows visual focus but don't change keyboard focus
*   as above, but remove keyboard focus from the old window (i.e. no window has keyboard focus until clicked on/alt-tabbed/desktop switch/...)
*   as above, but automatically give the focus to the new window after a 1sec timeout if nothing else happens

I know there's an existing "focus stealing prevention" setting, but it forces new windows to the background where they can be ignored.

Reproducible: Always