Add window focus handling