change window focus code