| 1048 | } |
| 1049 | |
| 1050 | void TaskbarAttributeWorker::InsertTaskbar(HMONITOR mon, Window window) |
| 1051 | { |
| 1052 | TaskbarInfo taskbarInfo = { .TaskbarWindow = window }; |
| 1053 | if (m_TaskbarType == TaskbarType::Mixed) |
| 1054 | { |
| 1055 | taskbarInfo.WorkerWWindow = window.find_child(L"WorkerW"); // early 22621 |
| 1056 | taskbarInfo.InnerXamlContent = window.find_child(L"Windows.UI.Composition.DesktopWindowContentBridge", L"DesktopWindowXamlSource"); // 22000 |
| 1057 | } |
| 1058 | else if (m_TaskbarType == TaskbarType::Classic) |
| 1059 | { |
| 1060 | taskbarInfo.PeekWindow = window.find_child(L"TrayNotifyWnd").find_child(L"TrayShowDesktopButtonWClass"); |
| 1061 | } |
| 1062 | |
| 1063 | m_NormalTaskbars.insert(window); |
| 1064 | m_Taskbars.insert_or_assign(mon, MonitorInfo { taskbarInfo }); |
| 1065 | |
| 1066 | if (wil::unique_hhook hook { m_InjectExplorerHook(window) }) |
| 1067 | { |
| 1068 | m_Hooks.push_back(std::move(hook)); |
| 1069 | } |
| 1070 | else |
| 1071 | { |
| 1072 | LastErrorHandle(spdlog::level::critical, L"Failed to set hook."); |
| 1073 | } |
| 1074 | } |
| 1075 | |
| 1076 | BOOL TaskbarAttributeWorker::MonitorEnumProc(HMONITOR hMonitor, HDC, LPRECT lprcMonitor, LPARAM dwData) |
| 1077 | { |
nothing calls this directly
no test coverage detected