If you really want to go barebones, just mmap /dev/fb0 and do a memset 0 on the region of screen that you want black. Key/pointer events are a matter of reading files from /dev/input.
It seems to me that we are adding a lot of complexity and going backwards feature-wise.
[1] http://freeglut.sourceforge.net/ [2] https://www.glfw.org/