Sync Avalonia management features and separate desktop instances
This commit is contained in:
1 parent
0a04d5990f
commit
8d3dbe296a
12 files changed
+157
-15
No files matched your search
@@ -2,13 +2,13 @@
|
||||
#define RUNNER_DESKTOP_INSTANCE_H_
|
||||
#include <windows.h>
|
||||
|
||||
// Shared with the Avalonia entry point, across installed/portable copies in
|
||||
// Flutter-only lease across installed/portable copies in
|
||||
// the same interactive Windows session.
|
||||
class DesktopInstance {
|
||||
public:
|
||||
DesktopInstance() {
|
||||
event_ = CreateEventW(nullptr, FALSE, FALSE, L"Local\\TTSTD.ADS.Desktop.Activate");
|
||||
mutex_ = CreateMutexW(nullptr, TRUE, L"Local\\TTSTD.ADS.Desktop.Instance");
|
||||
event_ = CreateEventW(nullptr, FALSE, FALSE, L"Local\\TTSTD.ADS.Flutter.Activate");
|
||||
mutex_ = CreateMutexW(nullptr, TRUE, L"Local\\TTSTD.ADS.Flutter.Instance");
|
||||
primary_ = mutex_ && GetLastError() != ERROR_ALREADY_EXISTS;
|
||||
}
|
||||
~DesktopInstance() {
|
||||
@@ -28,7 +28,7 @@ class DesktopInstance {
|
||||
reinterpret_cast<void*>(window), INFINITE, WT_EXECUTEDEFAULT) != FALSE;
|
||||
}
|
||||
static UINT ActivationMessage() {
|
||||
return RegisterWindowMessageW(L"TTSTD.ADS.Desktop.Activate");
|
||||
return RegisterWindowMessageW(L"TTSTD.ADS.Flutter.Activate");
|
||||
}
|
||||
private:
|
||||
static void CALLBACK Wake(void* context, BOOLEAN) {
|
||||
|
||||
Reference in new issue
Block a user