MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / InsertTaskbar

Method InsertTaskbar

TranslucentTB/taskbar/taskbarattributeworker.cpp:1050–1074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1048}
1049
1050void 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
1076BOOL TaskbarAttributeWorker::MonitorEnumProc(HMONITOR hMonitor, HDC, LPRECT lprcMonitor, LPARAM dwData)
1077{

Callers

nothing calls this directly

Calls 1

find_childMethod · 0.80

Tested by

no test coverage detected