terminal: fix sporadic (underline) pixel artifact

The framebuffer refresh call missed to consider that content may not
vertically start at 0.
This commit is contained in:
Norman Feske 2018-06-01 11:57:12 +02:00 committed by Christian Helmuth
parent fd7357d9d5
commit f12ddb4ee7

View File

@ -257,11 +257,14 @@ class Terminal::Text_screen_surface
} }
int const num_dirty_lines = last_dirty_line - first_dirty_line + 1; int const num_dirty_lines = last_dirty_line - first_dirty_line + 1;
if (num_dirty_lines > 0) if (num_dirty_lines > 0) {
_framebuffer.refresh(Rect(Point(0, first_dirty_line*_geometry.char_height), int const y = _geometry.start().y()
Area(_geometry.fb_size.w(), + first_dirty_line*_geometry.char_height;
num_dirty_lines*_geometry.char_height + unsigned const h = num_dirty_lines*_geometry.char_height
_geometry.unused_pixels().h()))); + _geometry.unused_pixels().h();
_framebuffer.refresh(Rect(Point(0, y),
Area(_geometry.fb_size.w(), h)));
}
} }
void apply_character(Character c) void apply_character(Character c)