Skip to content

Commit

Permalink
Disable Alt-Enter tracking by DXGI on HWND window
Browse files Browse the repository at this point in the history
  • Loading branch information
SoapyMan committed Apr 22, 2024
1 parent a07430f commit 19ae26e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dawn/native/d3d/SwapChainD3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ MaybeError SwapChain::InitializeSwapChainFromScratch() {
static_cast<HWND>(GetSurface()->GetHWND()),
&swapChainDesc, nullptr, nullptr, &swapChain1),
"Creating the IDXGISwapChain1"));

const HRESULT mwaResult = factory2->MakeWindowAssociation(static_cast<HWND>(GetSurface()->GetHWND()), DXGI_MWA_NO_ALT_ENTER);
if (mwaResult != DXGI_ERROR_NOT_CURRENTLY_AVAILABLE) {
DAWN_TRY(CheckHRESULT(mwaResult, "MakeWindowAssociation"));
}
break;
}
case Surface::Type::WindowsCoreWindow: {
Expand Down

0 comments on commit 19ae26e

Please sign in to comment.