Skip to content

Commit

Permalink
[FancyZones]Filtering popup windows for all operations (microsoft#28975)
Browse files Browse the repository at this point in the history
* updated popup check

* removed temporary fix

* spelling

* improve readability
  • Loading branch information
SeraphimaZykova authored Oct 12, 2023
1 parent 93d80f5 commit 1b333df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
9 changes: 0 additions & 9 deletions src/modules/fancyzones/FancyZonesLib/FancyZones.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1b333df

Please sign in to comment.