Fixed the problem where the picture display window gets focus even when it's not the active window.