Skip to content

Commit

Permalink
chore: improve boss key logic to avoid hiding other windows with simi…
Browse files Browse the repository at this point in the history
…lar class names (#104)

Close #100
  • Loading branch information
YorkWaugh authored Sep 9, 2024
1 parent 5b8d24f commit 2e2c019
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/hotkey.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ BOOL CALLBACK SearchChromeWindow(HWND hWnd, LPARAM lParam) {
0) // || wcscmp(buff, L"Chrome_WidgetWin_2")==0 || wcscmp(buff,
// L"SysShadow")==0 )
{
ShowWindow(hWnd, SW_HIDE);
hwnd_list.push_back(hWnd);
DWORD pid;
GetWindowThreadProcessId(hWnd, &pid);
if (pid == GetCurrentProcessId()) {
ShowWindow(hWnd, SW_HIDE);
hwnd_list.push_back(hWnd);
}
}
}
return true;
Expand Down

0 comments on commit 2e2c019

Please sign in to comment.