From 1a400bd7fd45b4333ae6cddfb2a0412459cd060d Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Tue, 17 Sep 2019 13:51:36 +0200 Subject: [PATCH] Filter windows moved by keyboard in FancyZones --- src/modules/fancyzones/lib/FancyZones.cpp | 4 ++-- src/modules/fancyzones/lib/pch.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/fancyzones/lib/FancyZones.cpp b/src/modules/fancyzones/lib/FancyZones.cpp index 3ad01a7990..2dc732cecf 100644 --- a/src/modules/fancyzones/lib/FancyZones.cpp +++ b/src/modules/fancyzones/lib/FancyZones.cpp @@ -588,7 +588,7 @@ void FancyZones::UpdateDragState(require_write_lock) noexcept void FancyZones::CycleActiveZoneSet(DWORD vkCode) noexcept { - if (const HWND window = GetForegroundWindow()) + if (const HWND window = get_filtered_active_window()) { if (const HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONULL)) { @@ -604,7 +604,7 @@ void FancyZones::CycleActiveZoneSet(DWORD vkCode) noexcept void FancyZones::OnSnapHotkey(DWORD vkCode) noexcept { - if (const HWND window = GetForegroundWindow()) + if (const HWND window = get_filtered_active_window()) { if (const HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTONULL)) { diff --git a/src/modules/fancyzones/lib/pch.h b/src/modules/fancyzones/lib/pch.h index f8fc77caa3..71976b8a92 100644 --- a/src/modules/fancyzones/lib/pch.h +++ b/src/modules/fancyzones/lib/pch.h @@ -23,6 +23,7 @@ #include "ZoneSet.h" #include "Zone.h" #include "util.h" +#include "common/common.h" #include "RegistryHelpers.h" #pragma comment(lib, "windowsapp")