| 53 | disableInPrograms = std::move(res); |
| 54 | } |
| 55 | bool IsSkipProgramTop() const { |
| 56 | |
| 57 | const auto& col = disableInPrograms; |
| 58 | |
| 59 | if (col.empty()) return false; |
| 60 | |
| 61 | auto info = Utils::GetFocusedWndInfo(); |
| 62 | |
| 63 | std::wstring path; |
| 64 | std::wstring name; |
| 65 | IFS_LOG(Utils::GetProcLowerNameByPid(info.pid_top, path, name)); |
| 66 | if (name.empty()) { |
| 67 | LOG_ANY(L"can't find name. pid={}", info.pid_top); |
| 68 | return false; |
| 69 | } |
| 70 | |
| 71 | if (col.contains(name)) { |
| 72 | LOG_ANY(L"Skip process by name {} because of disableInProcess", name); |
| 73 | return true; |
| 74 | } |
| 75 | |
| 76 | if (col.contains(path)) { |
| 77 | LOG_ANY(L"Skip process by path {} because of disableInProcess", path); |
| 78 | return true; |
| 79 | } |
| 80 | |
| 81 | return false; |
| 82 | } |
| 83 | |
| 84 | TLogLevel logLevel = LOG_LEVEL_3; |
| 85 |
no test coverage detected