mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[FancyZones] Fix handling newly created windows on Windows 11 (#28646)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <FancyZonesLib/Settings.h>
|
||||
#include <FancyZonesLib/SettingsObserver.h>
|
||||
#include <FancyZonesLib/trace.h>
|
||||
#include <FancyZonesLib/VirtualDesktop.h>
|
||||
#include <FancyZonesLib/WindowKeyboardSnap.h>
|
||||
#include <FancyZonesLib/WindowMouseSnap.h>
|
||||
#include <FancyZonesLib/WorkArea.h>
|
||||
@@ -397,12 +398,6 @@ void FancyZones::WindowCreated(HWND window) noexcept
|
||||
return;
|
||||
}
|
||||
|
||||
const bool isCandidateForLastKnownZone = FancyZonesWindowUtils::IsCandidateForZoning(window);
|
||||
if (!isCandidateForLastKnownZone)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
HMONITOR primary = MonitorFromWindow(nullptr, MONITOR_DEFAULTTOPRIMARY);
|
||||
HMONITOR active = primary;
|
||||
|
||||
@@ -994,7 +989,7 @@ bool FancyZones::ShouldProcessSnapHotkey(DWORD vkCode) noexcept
|
||||
return false;
|
||||
}
|
||||
|
||||
if (FancyZonesSettings::settings().overrideSnapHotkeys && FancyZonesWindowUtils::IsCandidateForZoning(window))
|
||||
if (FancyZonesSettings::settings().overrideSnapHotkeys)
|
||||
{
|
||||
HMONITOR monitor = WorkAreaKeyFromWindow(window);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user