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, 19 Mar 2017 20:38:50 +0100 Message-ID: References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@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 1489952425 29919 195.159.176.226 (19 Mar 2017 19:40:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 19 Mar 2017 19:40:25 +0000 (UTC) Cc: 25818@debbugs.gnu.org To: Anders Lindgren Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 19 20:40:18 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 1cpggU-0006Mz-Be for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Mar 2017 20:40:10 +0100 Original-Received: from localhost ([::1]:57841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpggY-0005om-MV for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 Mar 2017 15:40:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpggQ-0005ld-Jt for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2017 15:40:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cpggM-0001bD-MV for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2017 15:40:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37275) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cpggM-0001b7-C4 for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2017 15:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cpggM-0003HC-2z for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2017 15:40:02 -0400 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, 19 Mar 2017 19:40:02 +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.148995234312514 (code B ref 25818); Sun, 19 Mar 2017 19:40:02 +0000 Original-Received: (at 25818) by debbugs.gnu.org; 19 Mar 2017 19:39:03 +0000 Original-Received: from localhost ([127.0.0.1]:35474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpgfO-0003Fl-CX for submit@debbugs.gnu.org; Sun, 19 Mar 2017 15:39:03 -0400 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:40413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cpgfM-0003FF-II for 25818@debbugs.gnu.org; Sun, 19 Mar 2017 15:39:01 -0400 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id D6BEC223AD for <25818@debbugs.gnu.org>; Sun, 19 Mar 2017 19:35:28 +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=1489952127; x=1490816128; bh=UsgApK3MSKA6f S4iLv0LF8xGLqD0/z9M48fDJaENGvw=; b=ONCqdaONmkb5lCWAh4/rvfebg3dJa X/IoNKkf/hjC911o6f39evQU7l5tTPELfWDKyzTmEpESsEfu6Sf1Q4ZVBS14GZbl z18m8HcVSRO3DOllWf6r1FkCcA5xn+Z/QAsWHgQx4PKHqkk8u6AIwbQMVZAppM7q qerQFyc4qRkLr0= 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 t1albQrOa3-H for <25818@debbugs.gnu.org>; Sun, 19 Mar 2017 19:35:27 +0000 (UTC) Original-Received: from gray (119.74.127.176.dynamic.wline.res.cust.swisscom.ch [176.127.74.119]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id E810022379; Sun, 19 Mar 2017 19:35:26 +0000 (UTC) In-Reply-To: (Anders Lindgren's message of "Tue, 28 Feb 2017 21:35:15 +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:130732 Archived-At: Hi again, Sorry for taking a while to get back on this. Looking at this issue again, it would be helpful to know what version of OS X you use and whether you see the issue that I described in the first message of this thread (*), and also whether the patch I suggested stops frames from being placed above the top of the screen. Because from what I can see, I don't see how the patch will prevent you from doing so, unless you have "Spaces" turned off. (*) One quick way of finding out is running something like `(set-frame-position (selected-frame) 0 10000)' (best done from `emacs -Q'). If the moved frame cannot be returned on-screen programmatically, then you have the issue. If it stays on-screen, then you don't. My patch got rid of these lines: -#if MAC_OS_X_VERSION_MAX_ALLOWED >=3D MAC_OS_X_VERSION_10_9 - // If separate spaces is on, it is like each screen is independent. The= re is - // no spanning of frames across screens. - if ([NSScreen screensHaveSeparateSpaces]) - { - NSTRACE_MSG ("Screens have separate spaces"); - frameRect =3D [super constrainFrameRect:frameRect toScreen:screen]; - NSTRACE_RETURN_RECT (frameRect); - return frameRect; - } -#endif According to the Apple documentation, screensHaveSeparateSpaces() "returns a Boolean value that indicates whether each screen can have its own set of spaces. This method reflects whether the =E2=80=9CDisplays have separate Spaces=E2=80=9D option is enabled in Mission Control system preference. You might use the return value to determine how to present your app when in fullscreen mode." So the idea of this code was to constrain a frame only if "Spaces" is enabled, right? I assume then, that if you have "Spaces" turned on (but even if you don't necessarily use the feature), then frames are prevented from going entirely off-screen (which is a must for OS X). The reason I ask this is because I have no idea whether the problem exists in Emacs on newer versions of OS X. If it doesn't, then the fix can be added only for OS X < 10.9.