Mouse working when window is resized