allow WS_EX_TOOLWINDOW as valid windows to match 'Task Switching'

This commit is contained in:
WarmUpTill 2020-10-22 19:44:23 +02:00
parent 1e6a022787
commit 8aed15f3a8

View File

@ -23,8 +23,7 @@ static bool GetWindowTitle(HWND window, string &title)
static bool WindowValid(HWND window)
{
LONG_PTR styles, ex_styles;
RECT rect;
LONG_PTR styles;
DWORD id;
if (!IsWindowVisible(window))
@ -33,12 +32,8 @@ static bool WindowValid(HWND window)
if (id == GetCurrentProcessId())
return false;
GetClientRect(window, &rect);
styles = GetWindowLongPtr(window, GWL_STYLE);
ex_styles = GetWindowLongPtr(window, GWL_EXSTYLE);
if (ex_styles & WS_EX_TOOLWINDOW)
return false;
if (styles & WS_CHILD)
return false;