Add window focus detection
Add window resizing
Add window closing on escape
Close only with focus