fixup: move the test to IsWindowVisible

This commit is contained in:
Bartosz Sosnowski 2019-10-16 11:20:26 +02:00 committed by Bartosz Sosnowski
parent b17106e88d
commit e4c7ed9c3e
2 changed files with 1 additions and 5 deletions

View file

@ -199,7 +199,7 @@ private:
{
auto style = GetWindowLongPtr(window, GWL_STYLE);
auto exStyle = GetWindowLongPtr(window, GWL_EXSTYLE);
return WI_IsFlagSet(style, WS_MAXIMIZEBOX) && WI_IsFlagClear(style, WS_CHILD) && WI_IsFlagClear(exStyle, WS_EX_TOOLWINDOW);
return IsWindowVisible(window) && WI_IsFlagSet(style, WS_MAXIMIZEBOX) && WI_IsFlagClear(style, WS_CHILD) && WI_IsFlagClear(exStyle, WS_EX_TOOLWINDOW);
}
void Disable(bool const traceEvent)

View file

@ -167,10 +167,6 @@ IFACEMETHODIMP_(void) FancyZones::VirtualDesktopChanged() noexcept
// IFancyZonesCallback
IFACEMETHODIMP_(void) FancyZones::WindowCreated(HWND window) noexcept
{
// Ignore hidden windows
if (!IsWindowVisible(window)) {
return;
}
if (m_settings->GetSettings().appLastZone_moveWindows)
{
auto processPath = get_process_path(window);