+ // Build up foreground grid (Rects and windows)
+ // - This should already be built (mutated on window move/resize/reorder)
+
+ // For all windows, check for intersection with damage rects
+ for( auto rect : m_damageRects )
+ {
+ for( auto window : m_windows )
+ {
+ if( rect.Contains( window->m_rect ) )
+ {
+ window->Repaint( rect );
+ }
+ }
+ }
+
+ m_damageRects.clear();