| 53 | } |
| 54 | |
| 55 | com_ptr<DCompPrivate::ICompositedBackdropVisual> GetOrCreate(DWM::CTopLevelWindow* window, bool createIfNecessary, |
| 56 | bool silent) |
| 57 | { |
| 58 | auto it{ g_backdropMap.find(window) }; |
| 59 | |
| 60 | if (createIfNecessary) |
| 61 | { |
| 62 | auto data{ window->GetData() }; |
| 63 | |
| 64 | if ( |
| 65 | data && |
| 66 | it == g_backdropMap.end() |
| 67 | ) |
| 68 | { |
| 69 | HWND targetWindow{ data->GetHWND() }; |
| 70 | HWND shellWindow{ DWM::GetShellWindowForCurrentDesktop() }; |
| 71 | |
| 72 | if (targetWindow != shellWindow) |
| 73 | { |
| 74 | auto result{ g_backdropMap.emplace(window, winrt::make<CCompositedBackdropVisual>(window)) }; |
| 75 | if (result.second == true) |
| 76 | { |
| 77 | it = result.first; |
| 78 | |
| 79 | if (!silent) |
| 80 | { |
| 81 | RedrawTopLevelWindow(window); |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | return it == g_backdropMap.end() ? nullptr : it->second; |
| 89 | } |
| 90 | |
| 91 | com_ptr<DCompPrivate::ICompositedBackdropVisual> GetOrCreateForAccentBlurRect(DWM::CTopLevelWindow* window, |
| 92 | LPCRECT accentBlurRect, bool createIfNecessary, bool silent) |
no test coverage detected