Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X)

From: [email-masked] (Charles A. Roelli)
Date: Sun, 26 Feb 2017 16:40:04 +0100

On Sun, Feb 26 2017 at 12:26:46 pm, Charles A. Roelli wrote:

> See also https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18801.  It's
> possible that the problem was introduced from 24.3 to 24.4.

I built 24.3 and 24.4 from source, and it is correct that a regression
with Emacs' handling of the window system in OS X happened between those
two releases.

The form I suggested to show the issue,

(let ((display-width (display-pixel-width))
      (dx            200)
      (frame-x       1))
  (setq frame-test (make-frame
		    `((top . 1) (left . ,frame-x))))
  (sleep-for 0.5)
  ;; 1. Move it until it's off-screen.
  (while (< frame-x display-width)
    (setq frame-x (+ frame-x dx))
    (modify-frame-parameters frame-test
			     `((left . ,frame-x)))
    (sleep-for 0.5))
  (sleep-for 1)
  ;; 2. Bring it back.
  (while (> frame-x dx)
    (setq frame-x (- frame-x dx))
    (modify-frame-parameters frame-test
			     `((left . ,frame-x)))
    (sleep-for 0.5))
  (sleep-for 1)
  (delete-frame frame-test))

works correctly on 24.3 but not on 24.4 (24.4 has the same behavior as
25.1 and 25.2, detailed in my first message).  I guess the regression
would be in src/nsterm.m, or maybe src/nsfns.m.