[FancyZones] Allow snapping apps launched by Workspaces (#35067)

This commit is contained in:
Seraphima Zykova
2024-09-25 19:36:36 +03:00
committed by GitHub
parent ad1f20408c
commit 471db8bf9c
5 changed files with 70 additions and 30 deletions

View File

@@ -65,16 +65,28 @@ FancyZonesWindowProcessing::ProcessabilityType FancyZonesWindowProcessing::Defin
return ProcessabilityType::NotCurrentVirtualDesktop;
}
// Ignore windows launched by Workspaces
if (FancyZonesWindowProperties::IsLaunchedByWorkspaces(window))
{
return ProcessabilityType::LaunchedByWorkspaces;
}
return ProcessabilityType::Processable;
}
bool FancyZonesWindowProcessing::IsProcessable(HWND window) noexcept
bool FancyZonesWindowProcessing::IsProcessableAutomatically(HWND window) noexcept
{
return DefineWindowType(window) == ProcessabilityType::Processable;
auto type = DefineWindowType(window);
if (type != ProcessabilityType::Processable)
{
return false;
}
// Ignore windows launched by Workspaces
if (FancyZonesWindowProperties::IsLaunchedByWorkspaces(window))
{
return false;
}
return true;
}
bool FancyZonesWindowProcessing::IsProcessableManually(HWND window) noexcept
{
auto type = DefineWindowType(window);
return type == ProcessabilityType::Processable;
}