From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.bugs Subject: bug#25818: 25.2; frame moved off display does not return (OS X) Date: Sun, 26 Feb 2017 20:42:37 +0100 Message-ID: References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1488138200 925 195.159.176.226 (26 Feb 2017 19:43:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Feb 2017 19:43:20 +0000 (UTC) Cc: 25818@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 26 20:43:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci4iw-00083J-DB for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Feb 2017 20:43:14 +0100 Original-Received: from localhost ([::1]:48058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci4j2-0003P7-Fs for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Feb 2017 14:43:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ci4ip-0003Im-81 for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2017 14:43:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ci4ik-00013K-Ak for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2017 14:43:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58869) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ci4ik-000138-4l for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2017 14:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ci4ij-0003ZE-Qj for bug-gnu-emacs@gnu.org; Sun, 26 Feb 2017 14:43:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Feb 2017 19:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25818 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25818-submit@debbugs.gnu.org id=B25818.148813817313699 (code B ref 25818); Sun, 26 Feb 2017 19:43:01 +0000 Original-Received: (at 25818) by debbugs.gnu.org; 26 Feb 2017 19:42:53 +0000 Original-Received: from localhost ([127.0.0.1]:57068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci4ib-0003Yt-IU for submit@debbugs.gnu.org; Sun, 26 Feb 2017 14:42:53 -0500 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:51871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci4iZ-0003Ye-9b for 25818@debbugs.gnu.org; Sun, 26 Feb 2017 14:42:52 -0500 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id A52E122380 for <25818@debbugs.gnu.org>; Sun, 26 Feb 2017 19:39:34 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:in-reply-to:date:date:references:subject:subject:to :from:from; s=dkim; t=1488137972; x=1489001973; bh=Le2xyRlibH+Ef vPNAnJPWLvxNxz+nFf5yWre8fcs2BY=; b=umERJqkHTue7FT7xISz6Apr7QyuyB B2jwHRAUUeDvJsgACQyeu9QuK9PugfMC62M9mvYLHGYw+qKs2/C8s+b3lPvdYd+y TpYClDqWJk7rrlblj6zx92xMvwWjmB1+rEKueu13kVsKXHOLfmdIey53UYVFZGdH zGwKZIjkoZw6sg= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id MjlF8HQIiEM0 for <25818@debbugs.gnu.org>; Sun, 26 Feb 2017 19:39:32 +0000 (UTC) Original-Received: from gray (54.4.4.85.dynamic.wline.res.cust.swisscom.ch [85.4.4.54]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id B03FC2233E; Sun, 26 Feb 2017 19:39:31 +0000 (UTC) In-Reply-To: <58B30634.1090904@gmx.at> (martin rudalics's message of "Sun, 26 Feb 2017 17:45:40 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129839 Archived-At: On Sun, Feb 26 2017 at 05:45:40 pm, martin rudalics wrote: >>> See also https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18801. 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, > [...] >> 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. > > So something seems to have happened that Emacs fell into the same trap > as other applications (which, in my understanding, is that the frame > gets displayed on another, probably non-existent, monitor). I'm afraid > that my only suggestion is to bisect the sources until you've found the > culprit. > > (I suppose you verified that the value returned by =E2=80=98display-pixel= -width=E2=80=99 > is the same in 24.3 and 24.4.) No, I did not; thanks for the reminder. In 24.3, with a second monitor plugged in, (display-pixel-width) returns 1280, i.e. the width only of my primary monitor. In 24.4, in the same situation, (display-pixel-width) returns 2330 =3D (+ 1280 1050). Second monitor is 1050 pixels wide. In both the case of 24.3 and 24.4 with no external monitor attached, (display-pixel-width) returns 1280. So it seems that the code for `display-pixel-width' (or code that it calls) was changed between those releases, maybe to support multiple monitors. I notice now that when running the test form on 24.3, the created frame never actually leaves the visible portion of the screen. For example, when the code calls (sleep-for 1) with the frame supposedly being offscreen according to its frame parameters (right before step 2), the frame is in reality maybe 50 pixels left of the screen's right edge. This is with just one monitor. When I run the example with two monitors, the frame just spills into the second monitor but does not go further (since 24.3 does not seem to give correct values for `display-pixel-width' with multiple monitors). So it seems like there used to be code in Emacs that prevented a frame from programmatically leaving the screen area in OS X. For example, in 24.3, if I call (modify-frame-parameters nil '((left . 10000))), the frame is put, as above, about 50 pixels left of the screen's right edge.