From owner-svn-src-head@freebsd.org Wed Apr 12 17:38:01 2017 Return-Path: Delivered-To: svn-src-head@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 9F4BED3BCEA; Wed, 12 Apr 2017 17:38:01 +0000 (UTC) (envelope-from bde@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 6C5BF1D14; Wed, 12 Apr 2017 17:38:01 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3CHc0Uv053647; Wed, 12 Apr 2017 17:38:00 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CHc0np053646; Wed, 12 Apr 2017 17:38:00 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704121738.v3CHc0np053646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Wed, 12 Apr 2017 17:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316736 - head/sys/dev/syscons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 17:38:01 -0000 Author: bde Date: Wed Apr 12 17:38:00 2017 New Revision: 316736 URL: https://svnweb.freebsd.org/changeset/base/316736 Log: Trival style fix to previous commit to add this detail. The previous commit also fixed the coordinates passed to the mouse removal renderer. The coordinates were rounded down to a character boundary, and thus essentially unusable. The renderer had to keep track of the previous position, or clear a larger area. The latter is only safe in the border, which is all that needs special handling anyway. I think no renderer depends on the bug. They have the following handling: - gfb sparc64: this seems to assume non-rounded coordinates - gfb other: does nothing (seems to be missing border handling) - vga text: does nothing (doesn't need border handling) - vga planar: clears extras in the border, with some bugs. The fixes will use the precise coordinates to optimize. - vga direct: clears at the previous position with no check that it is active, and clears everything. Checking finds this bug. - others: are there any? Modified: head/sys/dev/syscons/scmouse.c Modified: head/sys/dev/syscons/scmouse.c ============================================================================== --- head/sys/dev/syscons/scmouse.c Wed Apr 12 17:06:24 2017 (r316735) +++ head/sys/dev/syscons/scmouse.c Wed Apr 12 17:38:00 2017 (r316736) @@ -252,7 +252,7 @@ sc_remove_mouse_image(scr_stat *scp) i = scp->mouse_oldpos; mark_for_update(scp, i); mark_for_update(scp, i); - cols = 1 + howmany(10 - 1, scp->font_width); /* up to VGA cursor width 9 */ + cols = 1 + howmany(10 - 1, scp->font_width); /* up to VGA cursor width 9 */ cols = imax(cols, 2); /* in case it is text mode 2x2 char cells */ cols = imin(cols, scp->xsize - i % scp->xsize); rows = 1 + howmany(16 - 1, scp->font_size); /* up to VGA cursor height 16 */