Subject: Re: bug#25057: Ediff 2.81.5 of July 4, 2013; control panel frame location and focus broken

From: [email-masked] (Charles A. Roelli)
Date: Sat, 18 Feb 2017 18:06:26 +0100

Ediff normally initializes its control frame to a location just outside
the viewable area of the monitor, then it brings the frame back into the
viewable area shortly afterwards.  With Emacs on OS X, though, it seems
that a frame that left the viewable area cannot return.

The following code slowly moves a frame across the width of the monitor
until it's a little past the viewable edge, then brings it back.

(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))

On GNU/Linux, the frame comes back as expected.  But on OS X 10.6 the
frame does not return to the viewable area (step 2).  Maybe there is a
bug in the frame handling code for the NS port.