mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-06-07 01:08:18 +08:00
[FancyZones] Move Trace::VirtualDesktopChange (#4320)
* Move Trace::VirtualDesktopChange to catch only the actual VD changes * Update the check * Add double check
This commit is contained in:
parent
236c1208e6
commit
f8cc129f04
@ -281,7 +281,6 @@ void FancyZonesModule::HandleWinHookEvent(WinHookEvent* data) noexcept
|
||||
// switches virtual desktops.
|
||||
if (data->hwnd == GetDesktopWindow())
|
||||
{
|
||||
Trace::VirtualDesktopChanged();
|
||||
m_app.as<IFancyZonesCallback>()->VirtualDesktopChanged();
|
||||
}
|
||||
}
|
||||
|
@ -650,6 +650,10 @@ void FancyZones::OnDisplayChange(DisplayChangeType changeType) noexcept
|
||||
if (VirtualDesktopUtils::GetCurrentVirtualDesktopId(¤tVirtualDesktopId))
|
||||
{
|
||||
m_currentDesktopId = currentVirtualDesktopId;
|
||||
if (m_previousDesktopId != GUID_NULL && m_currentDesktopId != m_previousDesktopId)
|
||||
{
|
||||
Trace::VirtualDesktopChanged();
|
||||
}
|
||||
}
|
||||
if (changeType == DisplayChangeType::Initialization)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user