[FancyZones] Fix deadlocks in ZoneWindowDrawing (#10461)

* Fixed deadlocks in ZoneWindowDrawing

Moved all possibly reentrant or blocking calls to ShowWindow out of critical sections.

* Initialize bools

* Tune flashing visuals

* Address PR comments

* Use  = true; to initialize bools
* Remove tracing from GetAnimationAlpha
* Use member initialization when constructing AnimationInfo

* Refactor rendering

* Whitespace

* Hide window on render failure
This commit is contained in:
Ivan Stošić
2021-03-29 13:39:16 +02:00
committed by GitHub
parent ccc380f11c
commit 31fa9475da
4 changed files with 80 additions and 67 deletions

View File

@@ -647,7 +647,7 @@ void FancyZones::ToggleEditor() noexcept
wil::unique_cotaskmem_string virtualDesktopId;
if (!SUCCEEDED(StringFromCLSID(m_currentDesktopId, &virtualDesktopId)))
{
return;
return;
}
/*
@@ -677,7 +677,7 @@ void FancyZones::ToggleEditor() noexcept
{
params += FancyZonesUtils::GenerateUniqueIdAllMonitorsArea(virtualDesktopId.get()) + divider; /* Monitor id where the Editor should be opened */
}
// device id map
std::unordered_map<std::wstring, DWORD> displayDeviceIdxMap;