mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[FancyZones]Fix not shown layout on window dragging(#18542)
* log * check if current vd id null
This commit is contained in:
@@ -24,7 +24,13 @@ namespace FancyZonesWindowProcessing
|
||||
// For windows that FancyZones shouldn't process (start menu, tray, popup menus)
|
||||
// VirtualDesktopManager is unable to retrieve virtual desktop id and returns an error.
|
||||
auto desktopId = VirtualDesktop::instance().GetDesktopId(window);
|
||||
if (!desktopId.has_value() || (desktopId.has_value() && *desktopId != VirtualDesktop::instance().GetCurrentVirtualDesktopId()))
|
||||
auto currentDesktopId = VirtualDesktop::instance().GetCurrentVirtualDesktopId();
|
||||
if (!desktopId.has_value())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (currentDesktopId != GUID_NULL && desktopId.value() != currentDesktopId)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -502,6 +502,7 @@ void WorkArea::CalculateZoneSet(OverlappingZonesAlgorithm overlappingAlgorithm)
|
||||
const auto appliedLayout = AppliedLayouts::instance().GetDeviceLayout(m_uniqueId);
|
||||
if (!appliedLayout.has_value())
|
||||
{
|
||||
Logger::error(L"Layout wasn't applied. Can't init zone set");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user