> Alternative solution without extra magic (need rebuild kernel). > > Before (on example pms(4)): > * user move mouse > * pms(4) read state mouse and process it > * pms(4) send dx, dy and buttons in wscons > * wscons generate simple events > * ws(4) reads one event and process it immediately > > After applying diff: > * user move mouse > * pms(4) read state mouse and process it > * pms(4) send dx, dy and buttons in wscons > * wscons generate simple events and adds SYNC event > * ws(4) reads events until it receives SYNC, and only then begins processing > > Tested on mouse. > > Comments ?
Testing with usb mouse, so far so good. Mouse wheel emulation seems to be working fine as well. The code reads ok to me, and it's definitely a lot cleaner than the old magic.