* lisp/image.el (image-show-frame): Don't force an update if the
buffer with the animation isn't in a window (bug#47895). Also
just update the window in question.
(setq n (min n (1- (car (plist-get (cdr image)
:animate-multi-frame-data)))))))
(plist-put (cdr image) :index n)
- (force-window-update))
+ (when-let ((window
+ (get-buffer-window (plist-get (cdr image) :animate-buffer) t)))
+ (force-window-update window)))
(defun image-animate-get-speed (image)
"Return the speed factor for animating IMAGE."