sirAndros / KeePassWinHello

Quick unlock KeePass 2 database using biometrics with Windows Hello
MIT License
302 stars 21 forks source link

Fix Windows Hello popup position #88

Closed davidegiacometti closed 2 years ago

davidegiacometti commented 2 years ago

Open Windows Hello popup centered on main desktop Fixes https://github.com/sirAndros/KeePassWinHello/issues/54

EDIT: not working properly on Windows 11

SilveIT commented 2 years ago

Hi. Have you tried using GetForegroundWindow? As we are autotyping in the foreground window the windows hello dialog should also popup in that window. Not quite sure what are you trying to achieve with the GetDesktopWindow...

davidegiacometti commented 2 years ago

Hi, I think GetForegroundWindow have more sense. The main problem is that this is working on Windows 10, but on Windows 11 the Windows Hello popup steal the focus to KeePass.

SilveIT commented 2 years ago

So.. If the fix won't work on W11 it will still work on W10 at least. Right? Fixing it on the W11 just will be another thing. I suggest you creating a pull request with the W10 fix (still recommend trying the GetForegroundWindow).

sirAndros commented 1 year ago

Hi! Please consider existing code: https://github.com/sirAndros/KeePassWinHello/blob/master/src/Utilities/Win32Window.cs#L178