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

Method ChangeForeground

src/WorkerImplement.cpp:199–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199void WorkerImplement::ChangeForeground(HWND hwnd)
200{
201 LOG_ANY(L"Now foreground hwnd={}", (void*)hwnd);
202 DWORD procId = 0;
203 DWORD threadid = GetWindowThreadProcessId(hwnd, &procId);
204 if (threadid != m_dwIdThreadForeground && procId != m_dwIdProcoreground)
205 {
206 //IFS_LOG(Utils::GetProcLowerNameByPid(procId, m_sTopProcPath, m_sTopProcName));
207 //LOG_INFO_2(L"threadid=%d, procId=%d, sname=%s", threadid, procId, m_sTopProcName.c_str());
208 ClearAllWords();
209 }
210 else {
211 LOG_ANY(L"skip clear words");
212 }
213 m_dwIdThreadForeground = threadid;
214 m_dwIdProcoreground = procId;
215}
216
217namespace {
218 void ProcessSnippet(const string& s) {

Callers 1

WorkerIntMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected