freebsd-nq/sys/dev/syscons
Bruce Evans eeab8fcc4b Quick fix for removal of the mouse cursor in vga direct graphics modes
(that is, in all supported 8, 15, 16 and 24-color modes).  Moving the
mouse cursor while holding down a button (giving cut marking) left a
trail of garbage from misremoved mouse cursors (usually colored
rectangles and not cursor shapes).  Cases with a button not held down
worked better and may even have worked.

No renderer support for removing (software) mouse cursors is needed
(and many renderers don't have any), since sc_remove_mouse_image()
marks for update the region containing the image and usually much
more.  The mouse cursor can be (partially) over as many as 4 character
cells, and removing it in only the 1-4 cells occupied by it would be
best for efficiency and for avoiding flicker.  However,
sc_remove_mouse_image() can only mark a single linear region and
usually marks a full row of cells and 1 more to be sure to cover the
4 cells.  It always does this, so using the special rendering method
just wastes even more time and gives even more flicker.  The special
methods will be removed soon.

The general method always works.  vga_pxlmouse_direct() appeared to
defer to it by returning immediately if !on.  However,
vga_pxlmouse_direct() actually did foot-shooting using a disguised
saveunder method.  Normal order near a mouse move is:
  (1) remove the mouse cursor in the renderer (optional)
  (2) remove the mouse cursor again and refresh the screen over the
      mouse cursor and much more from the vtb.  When the mouse has
      actually moved and a button is down, many attributes in this
      region are changed to be up to date with the new cut marking
  (3) draw the keyboard cursor again if it was clobbered by the update
  (4) draw the mouse cursor image in its new position.
The bug was to remove the mouse cursor again in step (4), before the
drawing it again in (4), using a saveunder that was valid in step (1)
at best.  The quick fix is to use the saveunder in step (1) and not
in step (4).  Using it in step (4) also used it before it was
initialized, initially and after  mode and screen switches.
2017-04-08 10:00:39 +00:00
..
apm
blank
daemon Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
dragon Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
fade
fire Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
green
logo Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
plasma Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
rain Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
snake
star Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
warp Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
scgfbrndr.c Fix removal of the keyboard cursor image in text mode, especially 2017-04-08 08:24:25 +00:00
schistory.c
scmouse.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
scterm-teken.c The switch to kernel terminal context needs to update more than the cursor 2017-03-29 14:46:26 +00:00
scterm.c
scvesactl.c
scvgarndr.c Quick fix for removal of the mouse cursor in vga direct graphics modes 2017-04-08 10:00:39 +00:00
scvidctl.c Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
scvtb.c
syscons.c The switch to kernel terminal context needs to update more than the cursor 2017-03-29 14:46:26 +00:00
syscons.h Fix removal of the keyboard cursor image in text mode, especially 2017-04-08 08:24:25 +00:00
sysmouse.c [evdev] Adds evdev support to sysmouse(4) driver 2016-12-10 18:07:16 +00:00