[FancyZones]Filtering popup windows for all operations (#28975)

* updated popup check

* removed temporary fix

* spelling

* improve readability
This commit is contained in:
Seraphima Zykova 2023-10-12 20:58:44 +03:00 committed by GitHub
parent 93d80f542c
commit 1b333dfee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 11 deletions

View File

@ -395,15 +395,6 @@ void FancyZones::WindowCreated(HWND window) noexcept
return;
}
// Hotfix
// Avoid automatically moving popup windows, as they can be just popup menus.
bool isPopup = FancyZonesWindowUtils::IsPopupWindow(window);
bool hasThickFrame = FancyZonesWindowUtils::HasThickFrame(window);
if (isPopup && !hasThickFrame)
{
return;
}
// Avoid already stamped (zoned) windows
const bool isZoned = !FancyZonesWindowProperties::RetrieveZoneIndexProperty(window).empty();
if (isZoned)

View File

@ -27,8 +27,9 @@ bool FancyZonesWindowProcessing::IsProcessable(HWND window) noexcept
// popup could be the window we don't want to snap: start menu, notification popup, tray window, etc.
// also, popup could be the windows we want to snap disregarding the "allowSnapPopupWindows" setting, e.g. Telegram
bool isPopup = FancyZonesWindowUtils::IsPopupWindow(window) && !FancyZonesWindowUtils::HasThickFrameAndMinimizeMaximizeButtons(window);
if (isPopup && !FancyZonesSettings::settings().allowSnapPopupWindows)
bool isPopup = FancyZonesWindowUtils::IsPopupWindow(window);
bool hasThickFrame = FancyZonesWindowUtils::HasThickFrame(window);
if (isPopup && (!hasThickFrame || !FancyZonesSettings::settings().allowSnapPopupWindows))
{
return false;
}