From owner-svn-src-all@freebsd.org Sat Apr 15 20:03:51 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 9050BD3F748; Sat, 15 Apr 2017 20:03:51 +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 3E79CFDC; Sat, 15 Apr 2017 20:03:51 +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 v3FK3oIu002357; Sat, 15 Apr 2017 20:03:50 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3FK3o3w002356; Sat, 15 Apr 2017 20:03:50 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704152003.v3FK3o3w002356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Sat, 15 Apr 2017 20:03:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316977 - 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-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: Sat, 15 Apr 2017 20:03:51 -0000 Author: bde Date: Sat Apr 15 20:03:50 2017 New Revision: 316977 URL: https://svnweb.freebsd.org/changeset/base/316977 Log: Add a 10x16 mouse cursor and use it in all graphics (strictly, pixel) modes if the font size is >= 14. This is the X cursor XC_left_ptr (#68) (glyph #45 in an X cursor font). Also found in vt. The old 9x13 cursor is the 10x16 one trimmed not very well. 8x8 fonts need a smaller cursor instead of a larger one, except when the pixel size is small. Text mode is still limited to width and height 1 more than the font (so the 9x13 is already 4 pixels too high for it). Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Sat Apr 15 19:47:50 2017 (r316976) +++ head/sys/dev/syscons/scvgarndr.c Sat Apr 15 20:03:50 2017 (r316977) @@ -173,6 +173,14 @@ static const struct mousedata mouse9x13 0x0c00, 0x0c00, 0x0600, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000, }, 9, 13, }; + +static const struct mousedata mouse10x16 = { { + 0xc000, 0xa000, 0x9000, 0x8800, 0x8400, 0x8200, 0x8100, 0x8080, + 0x8040, 0x83c0, 0x9200, 0xa900, 0xc900, 0x0480, 0x0480, 0x0300, }, { + 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7c00, 0x7e00, 0x7f00, + 0x7f80, 0x7c00, 0x6c00, 0x4600, 0x0600, 0x0300, 0x0300, 0x0000, }, + 10, 16, +}; #endif #endif @@ -1042,7 +1050,7 @@ draw_pxlmouse_planar(scr_stat *scp, int int i, j, k; uint8_t m1; - mdp = &mouse9x13; + mdp = (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; line_width = scp->sc->adp->va_line_width; xoff = (x - scp->xoff*8)%8; yoff = y - rounddown(y, line_width); @@ -1087,7 +1095,7 @@ remove_pxlmouse_planar(scr_stat *scp, in vm_offset_t p; int bx, by, i, line_width, xend, xoff, yend, yoff; - mdp = &mouse9x13; + mdp = (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; /* * It is only necessary to remove the mouse image where it overlaps @@ -1132,7 +1140,7 @@ vga_pxlmouse_direct(scr_stat *scp, int x uint8_t *u8; int bpp; - mdp = &mouse9x13; + mdp = (scp->font_size < 14) ? &mouse9x13 : &mouse10x16; /* * Determine overlap with the border and then if removing, do nothing