cocoa: actually reset the event flags
cocoa: readd some function calls