diff --git a/src/modules/fancyzones/lib/ZoneWindow.cpp b/src/modules/fancyzones/lib/ZoneWindow.cpp index ce7007ef96..ee0dbb620e 100644 --- a/src/modules/fancyzones/lib/ZoneWindow.cpp +++ b/src/modules/fancyzones/lib/ZoneWindow.cpp @@ -163,6 +163,7 @@ namespace ZoneWindowDrawUtils isHighlighted[x] = true; } + // First draw the inactive zones for (auto iter = zones.begin(); iter != zones.end(); iter++) { int zoneId = static_cast(iter - zones.begin()); @@ -188,7 +189,19 @@ namespace ZoneWindowDrawUtils DrawZone(hdc, colorViewer, zone, zones, flashMode); } } - else + } + + // Draw the active zones on top of the inactive zones + for (auto iter = zones.begin(); iter != zones.end(); iter++) + { + int zoneId = static_cast(iter - zones.begin()); + winrt::com_ptr zone = iter->try_as(); + if (!zone) + { + continue; + } + + if (isHighlighted[zoneId]) { colorHighlight.fill = highlightColor; colorHighlight.border = zoneBorderColor;