Bug 414712

Summary: Visually highlight (root) password prompts and prevent other windows to steal the focus
Product: [Plasma] plasmashell Reporter: postix <postix>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: nate, plasma-bugs-null, postix
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description postix 2019-12-01 10:21:42 UTC
Last time I used the Gnome shell I wanted to change the printer settings, which opened a password prompt for the root user. 

This prompt was visually focused by darkening the area gradually around this password dialog plus it was no longer possible to interact with other windows than this password dialog until I closed this prompt again.

It also prevented other apps to steal the focus.

Especially the last part would be really convenient for me for all kind of password dialogs and would solve the following issue:

It sometimes happened to me that I was entering a password (eg Thunderbird's master password), when another window opened and took away the focus, so that I started typing in the wrong window.

The dimming effect can play nice with root user password prompts to highlight their implication.
Comment 1 Nate Graham 2019-12-02 03:25:53 UTC
This is actually one of the most complained-about features of GNOME. :) Check out the more than one dozen duplicates on https://bugzilla.gnome.org/show_bug.cgi?id=688434

Making the password dialog system-modal does indeed solve the problem of focus stealing, but it also prevents you from doing anything else when it's active. For example, if you store passwords in a password manager/generator or an encrypted text file, you can no longer access those to copy your password for the purpose of pasting into the password dialog.

KWin has explicit focus stealing support. I think it would make more sense to report the bug there in a targeted manner ("x window stole focus while I was typing my password in a dialog originated by Z app") rather than using the sledgehammer approach that GNOME uses.