Window events

le woot. x button works now