Separate input handling & rendering

fix #19
Revert "don't swallow all events at once"

This reverts commit 8d62068812f8686ce2732e1ef4560d8f357b8eb0.