From owner-svn-src-all@freebsd.org Wed Apr 19 22:41:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEC08D4667C; Wed, 19 Apr 2017 22:41:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D2401393; Wed, 19 Apr 2017 22:41:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3JMfOs3040944; Wed, 19 Apr 2017 22:41:24 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3JMfOCo040943; Wed, 19 Apr 2017 22:41:24 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201704192241.v3JMfOCo040943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Apr 2017 22:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317173 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2017 22:41:25 -0000 Author: jkim Date: Wed Apr 19 22:41:24 2017 New Revision: 317173 URL: https://svnweb.freebsd.org/changeset/base/317173 Log: Always clear borders when the terminal is flushed. PR: 202288 Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Wed Apr 19 22:27:26 2017 (r317172) +++ head/sys/dev/vt/vt_core.c Wed Apr 19 22:41:24 2017 (r317173) @@ -1149,6 +1149,34 @@ vt_mark_mouse_position_as_dirty(struct v } #endif +static void +vt_set_border(struct vt_window *vw, term_color_t c) +{ + struct vt_device *vd = vw->vw_device; + term_rect_t *vda = &vw->vw_draw_area; + int x, y; + + /* Top bar. */ + for (y = 0; y < vda->tr_begin.tp_row; y++) + 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++) { + /* 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++) + 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 (x = 0; x < vd->vd_width; x++) + vd->vd_driver->vd_setpixel(vd, x, y, c); +} + static int vt_flush(struct vt_device *vd) { @@ -1214,6 +1242,7 @@ vt_flush(struct vt_device *vd) if (vd->vd_flags & VDF_INVALID) { vd->vd_flags &= ~VDF_INVALID; + vt_set_border(vw, TC_BLACK); vt_termrect(vd, vf, &tarea); if (vt_draw_logo_cpus) vtterm_draw_cpu_logos(vd); @@ -1528,34 +1557,6 @@ vtterm_opened(struct terminal *tm, int o VT_UNLOCK(vd); } -static void -vt_set_border(struct vt_window *vw, term_color_t c) -{ - struct vt_device *vd = vw->vw_device; - term_rect_t *vda = &vw->vw_draw_area; - int x, y; - - /* Top bar. */ - for (y = 0; y < vda->tr_begin.tp_row; y++) - 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++) { - /* 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++) - 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 (x = 0; x < vd->vd_width; x++) - vd->vd_driver->vd_setpixel(vd, x, y, c); -} - static int vt_change_font(struct vt_window *vw, struct vt_font *vf) { @@ -1621,7 +1622,6 @@ vt_change_font(struct vt_window *vw, str /* Force a full redraw the next timer tick. */ if (vd->vd_curwindow == vw) { - vt_set_border(vw, TC_BLACK); vd->vd_flags |= VDF_INVALID; vt_resume_flush_timer(vw->vw_device, 0); }