With some fonts, changing focus (M-x other-window) from a buffer with images, makes the content in the buffer with images to shift up and down. I am seeing this in Debian, with both the GTK and Lucid builds, under X11. The code below reproduces the problem. This problem has been identified while debugging a change on focus issue with pdf-tools (https://github.com/vedang/pdf-tools/pull/224#issuecomment-2014151358 and ff.) How to reproduce - Copy the images to /tmp (or place there three reasonably sized images, named image1.png, image2.png, image3.png) - emacs -Q - eval the following code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Place images in /tmp (progn (defun pin-vscroll-down (win) (set-window-vscroll win 200 t)) ;; Any of the following leads to the bug (set-frame-font "JuliaMono" nil t) ;; (set-frame-font "DM Mono" nil t) ;; (set-frame-font "Intel One Mono" nil t) (let* ((height (/ (* 2 (frame-pixel-height)) 15)) (image1 (create-image "/tmp/image1.png" nil nil :height height)) (image2 (create-image "/tmp/image2.png" nil nil :height height)) (image3 (create-image "/tmp/image3.png" nil nil :height height))) (with-current-buffer (get-buffer-create "*image-scroll-test*") (insert " \n \n \n \n \n \n") (put-image image1 1) (put-image image2 5) (put-image image3 9) ;; With larger image sizes (goto-char 3) ;; also triggers the problem. (goto-char 11) (add-hook 'pre-redisplay-functions #'pin-vscroll-down nil t)) (split-window-right) (other-window 1) (switch-to-buffer "*image-scroll-test*"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - M-x other-window - Notice how the images on the buffer on the right move up and down.