nullpo-head / WSL-Hello-sudo

Let's sudo by face recognition of Windows Hello on Windows Subsystem for Linux (WSL). It runs on both WSL 1 and WSL 2. This is a PAM module for Linux on WSL.
MIT License
1.22k stars 47 forks source link

Windows Hello dialogue doesn't get focus #18

Closed crispinb closed 3 years ago

crispinb commented 3 years ago

When I sudo (from Windows Terminal), the Windows Hello dialogue pops up unfocussed - the Terminal window keeps focus. In consequence I need to first switch to the Windows Hello window using mouse or alt-tab, and then authenticate (using a fingerprint scanner in my case). This somewhat detracts from the speed/fluency advantage of using Hello over entering a password.

I'm not sure if this is the same as the FAQ item entitled "The Windows Hello dialog sometimes appears in background." If so, apologies for the overlap, but I wonder if there is a way around it. I notice that this doesn't happen with Windows apps that use Windows Hello, eg. 1Password.

1Password first opens its own window, then the Windows Hello window appears on top of that (every time, and always achieving focus). Some sort of child window relationship perhaps? In which case, might it be possible for WSL-Hello-sudo to open a blank dummy window and do something similar?

I don't know anything about Win32 dev, so I may be talking out of my hat here. If so, ignore me ;)

piotrmocko commented 3 years ago

See some more comments on this topic https://github.com/nullpo-head/WSL-Hello-sudo/issues/4

crispinb commented 3 years ago

Ah - didn't spot that, thanks.

danepowell commented 3 years ago

Can this be closed to consolidate conversation in #4 ?

crispinb commented 3 years ago

Yep, makes sense.