mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 02:01:36 +03:00
Fixed single instance bug
This commit is contained in:
parent
a348befb3d
commit
14afe02125
@ -110,7 +110,7 @@ bool Win32Window::CreateAndShow(const std::wstring& title,
|
||||
// Attempt to create a mutex to enforce single instance.
|
||||
CreateMutex(NULL, TRUE, L"com.yubico.authenticator.mutex");
|
||||
if (GetLastError() == ERROR_ALREADY_EXISTS) {
|
||||
HWND handle=FindWindowA(NULL, "Yubico Authenticator");
|
||||
HWND handle=FindWindow(L"FLUTTER_RUNNER_WIN32_WINDOW", L"Yubico Authenticator");
|
||||
WINDOWPLACEMENT place = { sizeof(WINDOWPLACEMENT) };
|
||||
GetWindowPlacement(handle, &place);
|
||||
switch(place.showCmd) {
|
||||
|
Loading…
Reference in New Issue
Block a user