Skip to content

Commit

Permalink
[HotFix]Revert "[FancyZones]Filtering popup windows for all operations (
Browse files Browse the repository at this point in the history
#28975)" (#29532)

This reverts commit 1b333df.
  • Loading branch information
jaimecbernardo committed Oct 31, 2023
1 parent cded4ef commit 53133f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/modules/fancyzones/FancyZonesLib/FancyZones.cpp
Expand Up @@ -394,6 +394,15 @@ 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)
Expand Down
Expand Up @@ -27,9 +27,8 @@ 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);
bool hasThickFrame = FancyZonesWindowUtils::HasThickFrame(window);
if (isPopup && (!hasThickFrame || !FancyZonesSettings::settings().allowSnapPopupWindows))
bool isPopup = FancyZonesWindowUtils::IsPopupWindow(window) && !FancyZonesWindowUtils::HasThickFrameAndMinimizeMaximizeButtons(window);
if (isPopup && !FancyZonesSettings::settings().allowSnapPopupWindows)
{
return false;
}
Expand Down

0 comments on commit 53133f0

Please sign in to comment.