MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / IsSkipProgramTop

Method IsSkipProgramTop

src/Settings.h:55–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

LowLevelKeyboardProcMethod · 0.80

Calls 4

GetFocusedWndInfoFunction · 0.85
GetProcLowerNameByPidFunction · 0.85
containsMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected