mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 14:59:16 +08:00
[FancyZones]Filtering popup windows for all operations (#28975)
* updated popup check * removed temporary fix * spelling * improve readability
This commit is contained in:
parent
93d80f542c
commit
1b333dfee0
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user