]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make libvgl mostly work without superuser privilege in direct modes by
authorbde <bde@FreeBSD.org>
Sat, 20 Apr 2019 20:29:03 +0000 (20:29 +0000)
committerbde <bde@FreeBSD.org>
Sat, 20 Apr 2019 20:29:03 +0000 (20:29 +0000)
commit35b6fb039bd929a9ca4ea09c4533506cb899c454
tree507990249adaf45bec3b9b8025bc9ae7a18b10c2
parentb331cfbc166333c8d5d66648cf188e3d26400f56
Make libvgl mostly work without superuser privilege in direct modes by
not doing any unnecessary PIO instructions or refusing to start when the
i/o privilege needed for these instructions cannot be acquired.

This turns off useless palette management in direct modes.  Palette
management had no useful effect since the hardware palette is not used
in these modes.

This transiently acquires i/o privilege if possible as needed to give
VGLSetBorder() and VGLBlankDisplay() a chance of working.  Neither has
much chance of working.  I was going to drop support for them in direct
modes, but found that VGLBlankDisplay() still works with an old graphics
card on a not so old LCD monitor.

This has some good side effects: reduce glitches for managing the palette
for screen switches, and speed up and reduce async-signal-unsafeness in
mouse cursor drawing.
lib/libvgl/main.c
lib/libvgl/mouse.c
lib/libvgl/simple.c