Add window event to control display