If anyone wanted to know how the very nice and smooth Silken mouse in
XFree86 4.x was implemented, it’s very simple (simpler than I had
thought), but a bit complicated to implement: they turn on the SIGIO
option on the mouse device file descriptor, then handle and dispatch
mouse events right there in the asynchronous signal handler.
The dispatching part is the hardest, doing so without crashing (because
signal handlers are a touchy business) and keeping the X server
together.
I thought that this might be useful for the fbcon driver of SDL. Maybe
you could improve overall smootheness by doing this with the X stream
file descriptor also, handling some selected events (like keypresses and
mouse events) right in the signal handler.–
“We make rope.” – Rob Gingell on Sun Microsystem’s new virtual memory.