Unnecessary reloading of the image when the window loses focus
Since 63ecd04c, the image is unnecessarily reloaded each time the window loses or regains focus, which can be very costly on large images.
See for example #62 (closed) for a reasonable test case, and discussion #27 (comment 35324).