1
0
mirror of https://github.com/bitwarden/browser synced 2026-03-01 11:01:17 +00:00

Fix focusing behavior

This commit is contained in:
Bernd Schoolmann
2025-08-29 13:00:40 +02:00
parent 4111213a23
commit b8c2553624
2 changed files with 3 additions and 13 deletions

View File

@@ -204,13 +204,7 @@ impl super::BiometricTrait for BiometricLockSystem {
/// Get a yes/no authorization without any cryptographic backing.
/// This API has better focusing behavior
fn windows_hello_authenticate(hwnd: Vec<u8>, message: String) -> Result<bool> {
let window = HWND(isize::from_le_bytes(hwnd.clone().try_into().unwrap()) as *mut c_void);
// The Windows Hello prompt is displayed inside the application window. For best result we
// should set the window to the foreground and focus it.
set_focus(window);
fn windows_hello_authenticate(_hwnd: Vec<u8>, message: String) -> Result<bool> {
// Windows Hello prompt must be in foreground, focused, otherwise the face or fingerprint
// unlock will not work. We get the current foreground window, which will either be the
// Bitwarden desktop app or the browser extension.

View File

@@ -74,13 +74,9 @@ export class WindowMain {
});
ipcMain.on("window-focus", () => {
this.logService.info("Focusing window");
if (this.win != null) {
this.logService.info("Showing window");
this.win.minimize();
this.show();
this.win.setSize(this.defaultWidth, this.defaultHeight);
this.win.center();
this.win.show();
this.win.focus();
}
});