Skip to content

Commit

Permalink
Fix reversed order of zones in layout (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
vldmr11080 authored Jan 15, 2020
1 parent 588f134 commit 5dc60b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/ZoneSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ IFACEMETHODIMP_(winrt::com_ptr<IZone>) ZoneSet::ZoneFromPoint(POINT pt) noexcept
winrt::com_ptr<IZone> smallestKnownZone = nullptr;
// To reduce redundant calculations, we will store the last known zones area.
int smallestKnownZoneArea = INT32_MAX;
for (auto iter = m_zones.begin(); iter != m_zones.end(); iter++)
for (auto iter = m_zones.rbegin(); iter != m_zones.rend(); iter++)
{
if (winrt::com_ptr<IZone> zone = iter->try_as<IZone>())
{
Expand Down
2 changes: 1 addition & 1 deletion src/modules/fancyzones/lib/ZoneWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ void ZoneWindow::DrawActiveZoneSet(wil::unique_hdc& hdc, RECT const& clientRect)
auto zones = m_activeZoneSet->GetZones();
const size_t maxColorIndex = min(size(zones) - 1, size(colors) - 1);
size_t colorIndex = maxColorIndex;
for (auto iter = zones.rbegin(); iter != zones.rend(); iter++)
for (auto iter = zones.begin(); iter != zones.end(); iter++)
{
winrt::com_ptr<IZone> zone = iter->try_as<IZone>();
if (!zone)
Expand Down

0 comments on commit 5dc60b9

Please sign in to comment.