nitpicker: fix transparency artifacts

The 'View_stack::draw_rec' method limited the redraw to parts of the
view that were explicitly marked as dirty. This does not produce the
desired result when stacking multiple transparent views. Here, the
background views must be drawn regardless of whether they are marked as
dirty or not.
This commit is contained in:
Norman Feske 2018-05-14 20:22:55 +02:00 committed by Christian Helmuth
parent 096c1e1f7f
commit d3626bd84f

View File

@ -213,13 +213,8 @@ void View_stack::refresh_view(View_component &view, Rect const rect)
/* rectangle constrained to view geometry */
Rect const view_rect = Rect::intersect(rect, _outline(view));
for (View_component *v = _first_view(); v; v = v->view_stack_next()) {
Rect const intersection = Rect::intersect(view_rect, _outline(*v));
if (intersection.valid())
_mark_view_as_dirty(*v, intersection);
}
for (View_component *v = _first_view(); v; v = v->view_stack_next())
_mark_view_as_dirty(*v, view_rect);
view.for_each_child([&] (View_component &child) { refresh_view(child, rect); });
}