fix: windows cm popup issue

This commit is contained in:
Kingtous 2022-10-24 15:56:27 +08:00
parent ce959f6c78
commit 30ddc95c6b

View File

@ -48,6 +48,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
free_c_args(c_args, args_len);
// uni links dispatch
// only do uni links when dispatch a rustdesk links
if (!rust_args.empty() && rust_args.front().compare("rustdesk://") == 0) {
HWND hwnd = ::FindWindow(L"FLUTTER_RUNNER_WIN32_WINDOW", L"rustdesk");
if (hwnd != NULL) {
DispatchToUniLinksDesktop(hwnd);
@ -56,7 +58,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
::SetForegroundWindow(hwnd);
return EXIT_FAILURE;
}
}
// Attach to console when present (e.g., 'flutter run') or create a
// new console when running with a debugger.
if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent())