Skip to content

Commit

Permalink
check desktop id (#12930)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeraphimaZykova authored and jaimecbernardo committed Aug 27, 2021
1 parent da46b90 commit 2696b93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/fancyzones/FancyZonesLib/FancyZones.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ void FancyZones::WindowCreated(HWND window) noexcept
return;
}

if (!m_virtualDesktop.IsWindowOnCurrentDesktop(window))
auto desktopId = m_virtualDesktop.GetDesktopId(window);
if (desktopId.has_value() && *desktopId != m_currentDesktopId)
{
// Switch between virtual desktops results with posting same windows messages that also indicate
// creation of new window. We need to check if window being processed is on currently active desktop.
Expand Down

0 comments on commit 2696b93

Please sign in to comment.