[idd] ensure the only active monitor is the IDD

This commit is contained in:
Geoffrey McRae
2026-07-18 22:20:36 +10:00
parent 58e0cf340d
commit 6f2a81edf8
5 changed files with 256 additions and 7 deletions

View File

@@ -124,6 +124,10 @@ int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _
g_pipe.ReloadSettings();
});
window.onDisplayChange([]() {
return g_pipe.EnsureOnlyDisplay();
});
HANDLE hWait;
if (!RegisterWaitForSingleObject(&hWait, hParent.Get(), DestroyNotifyWindow, &window, INFINITE, WT_EXECUTEONLYONCE))
DEBUG_ERROR_HR(GetLastError(), "Failed to RegisterWaitForSingleObject");
@@ -445,4 +449,4 @@ static void Launch()
l_process.Attach(pi.hProcess);
CloseHandle(pi.hThread);
}
}