freebsd-dev/lib/libvgl
Bruce Evans 53384ed5ee Fix some races and screeen clearing in VGLEnd().
The mouse signal SIGUSR2 was not turned off for normal termination and
in some other cases.  Thus mouse signals arriving after the frame
buffer was unmapped always caused fatal traps.  The fatal traps occurred
about 1 time in 5 if the mouse was wiggled while vgl is ending.

The screen switch signal SIGUSR1 was turned off after clearing the
flag that it sets.  Unlike the mouse signal, this signal is handled
synchronously, but VGLEnd() does screen clearing which does the
synchronous handling.  This race is harder to lose.  I think it can
get vgl into deadlocked state (waiting in the screen switch handler
with SIGUSR1 to leave that state already turned off).

Turn off the mouse cursor before clearing the screen in VGLEnd().
Otherwise, clearing is careful to not clear the mouse cursor.  Undrawing
an active mouse cursor uses a lot of state, so is dangerous for abnormal
termination, but so is clearing.  Clearing is slow and is usually not
needed, since the kernel also does it (not quite right).
2019-04-24 13:15:56 +00:00
..
bitmap.c Fix mouse cursor coloring in depths > 8 (previously, a hack that only 2019-04-22 19:31:16 +00:00
keyboard.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
main.c Fix some races and screeen clearing in VGLEnd(). 2019-04-24 13:15:56 +00:00
Makefile First pass through library packaging. 2016-02-04 21:16:35 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mouse.c Fix mouse cursor coloring in depths > 8 (previously, a hack that only 2019-04-22 19:31:16 +00:00
simple.c Fix mouse cursor coloring in depths > 8 (previously, a hack that only 2019-04-22 19:31:16 +00:00
text.c Fix the type of the color args for VGLMouseFreeze(), VGLBitmapPutChar(), 2019-03-24 20:36:35 +00:00
vgl.3 Oops, my previous commit to libvgl was missing the change of VGLSetBorder() 2019-03-24 20:43:21 +00:00
vgl.h Fix mouse cursor coloring in depths > 8 (previously, a hack that only 2019-04-22 19:31:16 +00:00