svn commit: r316736 - head/sys/dev/syscons

Bruce Evans bde at FreeBSD.org
Wed Apr 12 17:38:01 UTC 2017


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 */


More information about the svn-src-all mailing list