Bug 472977

Summary: Auth dialog should not respect focus-follows-mouse
Product: [Plasma] policykit-kde-agent-1 Reporter: Reuben <kde>
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: drf, jgrulich, jreznik, nate
Priority: NOR    
Version First Reported In: 5.27.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Reuben 2023-08-03 20:17:50 UTC
SUMMARY

STEPS TO REPRODUCE
0. Have window behavior / focus set to "focus follows mouse" because you're not a heretic
1. Open Discover from the "updates available" prompt in the system tray
2. Click on update all / sudo dialog pops up
3. Somehow move mouse before typing password (I will try to repro and update - I've done this often enough now that there's more than just pebkac going on)

OBSERVED RESULT

Password is entered into the search field in Discover (because Discover grabs focus on the search field) and presumably has the potential to end up in system logs somewhere = bad times.

EXPECTED RESULT

Because Discover (and ideally the solution can be applied more generally) knows that it launched the sudo dialog, it should disable keyboard input until the sudo dialog is closed one way or the other. I.e. the sudo dialog should be a true modal rather than a float-in-front dialog. 

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 23.04
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.0-26-generic (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5700G with Radeon Graphics
Memory: 30.6 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: ASUS
ADDITIONAL INFORMATION