[idd] don't rebuild the monitor from inside the old monitor's context
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / idd (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run

This commit is contained in:
Geoffrey McRae
2026-07-16 16:13:24 +10:00
parent fbf564f2e1
commit b97a0b79f1
2 changed files with 20 additions and 1 deletions

View File

@@ -155,6 +155,12 @@ private:
bool m_doSetMode = false;
volatile LONG m_replugMonitorQueued = 0;
volatile LONG m_recoverModeUpdateSwapChain = 0;
// Set from the IddCx unassign callback to defer the monitor rebuild
// (FinishInit) onto the LGMP timer. Creating/arriving a new monitor from
// inside the old monitor's unassign callback re-enters IddCx while its
// swap-chain teardown is still unwinding, which leaves the new swap-chain
// surfaces in a lost/abandoned state.
volatile LONG m_finishInitQueued = 0;
public:
CIndirectDeviceContext(_In_ WDFDEVICE wdfDevice) :