diff --git a/src/common/hwnd_data_cache.h b/src/common/hwnd_data_cache.h index fea02e37f9..738cda0add 100644 --- a/src/common/hwnd_data_cache.h +++ b/src/common/hwnd_data_cache.h @@ -26,10 +26,7 @@ private: // List of HWNDs that are not interesting - like desktop, cortana, etc std::vector invalid_hwnds = { GetDesktopWindow(), GetShellWindow() }; // List of invalid window basic styles - std::vector invalid_basic_styles = { WS_CHILD, WS_DISABLED, DS_ABSALIGN, DS_SYSMODAL, DS_LOCALEDIT, - DS_SETFONT, DS_MODALFRAME, DS_NOIDLEMSG, DS_SETFOREGROUND, DS_3DLOOK, - DS_FIXEDSYS, DS_NOFAILCREATE, DS_CONTROL, DS_CENTER, DS_CENTERMOUSE, - DS_CONTEXTHELP, DS_SHELLFONT }; + std::vector invalid_basic_styles = { WS_CHILD, WS_DISABLED }; // List of invalid window extended styles std::vector invalid_ext_styles = { WS_EX_TOOLWINDOW, WS_EX_NOACTIVATE }; // List of invalid window classes - things like start menu, etc. diff --git a/src/modules/fancyzones/lib/FancyZones.cpp b/src/modules/fancyzones/lib/FancyZones.cpp index 27a945298f..5287b416a6 100644 --- a/src/modules/fancyzones/lib/FancyZones.cpp +++ b/src/modules/fancyzones/lib/FancyZones.cpp @@ -680,6 +680,10 @@ void FancyZones::CycleActiveZoneSet(DWORD vkCode) noexcept { if (const HWND window = get_filtered_active_window()) { + if (GetWindow(window, GW_OWNER) != nullptr) + { + return; + } if (const HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONULL)) { std::shared_lock readLock(m_lock); @@ -696,6 +700,10 @@ void FancyZones::OnSnapHotkey(DWORD vkCode) noexcept { if (const HWND window = get_filtered_active_window()) { + if (GetWindow(window, GW_OWNER) != nullptr) + { + return; + } if (const HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONULL)) { std::shared_lock readLock(m_lock);