better state and ui
+ size event
draw->damage, some bug fixes, + rect
poll: won't return if there's no correct event