Client code has control over main loop

todo: can't close the window because I am not responding to events
properly