Merge remote-tracking branch 'upstream/master' into locPowerRename

This commit is contained in:
Alekhya Kommuru 2020-01-20 11:54:20 -08:00
commit 23bba969dd
2 changed files with 9 additions and 4 deletions

View File

@ -26,10 +26,7 @@ private:
// List of HWNDs that are not interesting - like desktop, cortana, etc // List of HWNDs that are not interesting - like desktop, cortana, etc
std::vector<HWND> invalid_hwnds = { GetDesktopWindow(), GetShellWindow() }; std::vector<HWND> invalid_hwnds = { GetDesktopWindow(), GetShellWindow() };
// List of invalid window basic styles // List of invalid window basic styles
std::vector<LONG> invalid_basic_styles = { WS_CHILD, WS_DISABLED, DS_ABSALIGN, DS_SYSMODAL, DS_LOCALEDIT, std::vector<LONG> invalid_basic_styles = { WS_CHILD, WS_DISABLED };
DS_SETFONT, DS_MODALFRAME, DS_NOIDLEMSG, DS_SETFOREGROUND, DS_3DLOOK,
DS_FIXEDSYS, DS_NOFAILCREATE, DS_CONTROL, DS_CENTER, DS_CENTERMOUSE,
DS_CONTEXTHELP, DS_SHELLFONT };
// List of invalid window extended styles // List of invalid window extended styles
std::vector<LONG> invalid_ext_styles = { WS_EX_TOOLWINDOW, WS_EX_NOACTIVATE }; std::vector<LONG> invalid_ext_styles = { WS_EX_TOOLWINDOW, WS_EX_NOACTIVATE };
// List of invalid window classes - things like start menu, etc. // List of invalid window classes - things like start menu, etc.

View File

@ -680,6 +680,10 @@ void FancyZones::CycleActiveZoneSet(DWORD vkCode) noexcept
{ {
if (const HWND window = get_filtered_active_window()) if (const HWND window = get_filtered_active_window())
{ {
if (GetWindow(window, GW_OWNER) != nullptr)
{
return;
}
if (const HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONULL)) if (const HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONULL))
{ {
std::shared_lock readLock(m_lock); 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 (const HWND window = get_filtered_active_window())
{ {
if (GetWindow(window, GW_OWNER) != nullptr)
{
return;
}
if (const HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONULL)) if (const HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONULL))
{ {
std::shared_lock readLock(m_lock); std::shared_lock readLock(m_lock);