Filter windows moved by keyboard in FancyZones

This commit is contained in:
Bartosz Sosnowski 2019-09-17 13:51:36 +02:00 committed by Bartosz Sosnowski
parent 487c485911
commit 1a400bd7fd
2 changed files with 3 additions and 2 deletions

View File

@ -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))
{

View File

@ -23,6 +23,7 @@
#include "ZoneSet.h"
#include "Zone.h"
#include "util.h"
#include "common/common.h"
#include "RegistryHelpers.h"
#pragma comment(lib, "windowsapp")