mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
Fix end coordinate of the drawable area of border. Although the name tr_end
suggests it is the end coordinate, tr_end.tp_row is width and tr_end.tp_col is height of the drawable area in reality. PR: 202288
This commit is contained in:
parent
d4993b6db2
commit
0e37dd1fee
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317560
@ -1161,18 +1161,18 @@ vt_set_border(struct vt_window *vw, term_color_t c)
|
||||
for (x = 0; x < vd->vd_width; x++)
|
||||
vd->vd_driver->vd_setpixel(vd, x, y, c);
|
||||
|
||||
for (y = vda->tr_begin.tp_row; y <= vda->tr_end.tp_row; y++) {
|
||||
for (y = vda->tr_begin.tp_row; y < vda->tr_end.tp_row; y++) {
|
||||
/* Left bar. */
|
||||
for (x = 0; x < vda->tr_begin.tp_col; x++)
|
||||
vd->vd_driver->vd_setpixel(vd, x, y, c);
|
||||
|
||||
/* Right bar. */
|
||||
for (x = vda->tr_end.tp_col + 1; x < vd->vd_width; x++)
|
||||
for (x = vda->tr_end.tp_col; x < vd->vd_width; x++)
|
||||
vd->vd_driver->vd_setpixel(vd, x, y, c);
|
||||
}
|
||||
|
||||
/* Bottom bar. */
|
||||
for (y = vda->tr_end.tp_row + 1; y < vd->vd_height; y++)
|
||||
for (y = vda->tr_end.tp_row; y < vd->vd_height; y++)
|
||||
for (x = 0; x < vd->vd_width; x++)
|
||||
vd->vd_driver->vd_setpixel(vd, x, y, c);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user