From unknown Wed Jun 18 00:28:07 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#25818 <25818@debbugs.gnu.org> To: bug#25818 <25818@debbugs.gnu.org> Subject: Status: 25.2; frame moved off display does not return (OS X) Reply-To: bug#25818 <25818@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:28:07 +0000 retitle 25818 25.2; frame moved off display does not return (OS X) reassign 25818 emacs submitter 25818 charles@aurox.ch (Charles A. Roelli) severity 25818 normal tag 25818 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 20 15:05:32 2017 Received: (at submit) by debbugs.gnu.org; 20 Feb 2017 20:05:32 +0000 Received: from localhost ([127.0.0.1]:47817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfuDD-0006MI-UV for submit@debbugs.gnu.org; Mon, 20 Feb 2017 15:05:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfuDB-0006M5-Mv for submit@debbugs.gnu.org; Mon, 20 Feb 2017 15:05:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfuD5-0004hJ-Fp for submit@debbugs.gnu.org; Mon, 20 Feb 2017 15:05:24 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52347) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cfuD5-0004hC-Bm for submit@debbugs.gnu.org; Mon, 20 Feb 2017 15:05:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfuD2-0004Pl-M1 for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 15:05:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfuCy-0004fZ-EF for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 15:05:20 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:53323) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cfuCy-0004bW-6Q for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 15:05:16 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 5813E22366 for ; Mon, 20 Feb 2017 20:02:00 +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-type:content-type:mime-version:message-id:date:date :subject:subject:to:from:from; s=dkim; t=1487620918; x= 1488484919; bh=ynZYO5SR8e15YZwhLgfUteN2arPy9finRnsKcAhd9VA=; b=b EwUgN9AnYmZVPCke9OBfgfmBaAKwvLBvZhg2wR+YzGykVXa9t6pn1ITT6aiNsuvi StRzDAbxdx6SGpI6xmRMDzsTs+O3Y+oHxuR8uZy30RdhXka2rGRjKsQOjo24KB8R 1gGnYG9VTa4UJlU7t1ZgbBLgYqf7s7BycvFuuOaE/A= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 tv4eplg7gtk7 for ; Mon, 20 Feb 2017 20:01:58 +0000 (UTC) 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 394AD2233E for ; Mon, 20 Feb 2017 20:01:57 +0000 (UTC) From: charles@aurox.ch (Charles A. Roelli) To: bug-gnu-emacs@gnu.org Subject: 25.2; frame moved off display does not return (OS X) Date: Mon, 20 Feb 2017 21:04:58 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) After looking into a possible bug in Ediff on OS X (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25057) it looks like there may be a bug in the frame handling code for OS X. You can evaluate this code from emacs -Q to have a frame gradually moved in steps of 200 px from position ((top . 1) (left . 1)) until it's just past the right edge of the display (more or less), and then come back again: (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 and MS Windows the frame behaves as expected: when the frame parameters are changed to bring it back onscreen (step 2), the frame becomes visible again. On OS X 10.6 the frame stays off screen, however, and I can't find any way to put it back on screen. You can change the frame parameters for `top' and `left', and they'll stick, but they don't actually seem to have any effect. Can someone reproduce this on a more recent OS X? Maybe the problem is fixed in newer versions. In GNU Emacs 25.2.1 (x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549)) of 2017-02-07 built on gray Windowing system distributor 'Apple', version 10.3.1038 Configured using: 'configure --with-modules' Configured features: JPEG RSVG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 23 03:50:24 2017 Received: (at 25818) by debbugs.gnu.org; 23 Feb 2017 08:50:24 +0000 Received: from localhost ([127.0.0.1]:51949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgp6V-0007oy-SH for submit@debbugs.gnu.org; Thu, 23 Feb 2017 03:50:24 -0500 Received: from mout.gmx.net ([212.227.15.15]:53813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgp6U-0007ol-9N for 25818@debbugs.gnu.org; Thu, 23 Feb 2017 03:50:22 -0500 Received: from [192.168.1.100] ([213.162.68.87]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lxgt9-1cIGv71ch1-017EPu; Thu, 23 Feb 2017 09:50:06 +0100 Message-ID: <58AEA232.4000708@gmx.at> Date: Thu, 23 Feb 2017 09:49:54 +0100 From: martin rudalics MIME-Version: 1.0 To: "Charles A. Roelli" , 25818@debbugs.gnu.org Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:LZyb5i4w2pe7CP/7r+kkxSM4dRzS6jVQUM3pfF80OvotpmkPvsN D9vl0uJ6uVBVd4Z7Ou5QujyoVxuUzPbcQnisz3MiCv1McT7QAjzobMYZYYbhTdWTrRRWguk 6auVCvx7keIWN+Gw5ekvOpOklMElu2sThmA4N3jRT3s8OUajm/NF+9GfttCETOriqOZgjyw AijH8SCo2qFr1OIKjFgvg== X-UI-Out-Filterresults: notjunk:1;V01:K0:YIw+A06APwE=:LV4Nw7bpUj+OYk64SwPUUx QpouEv5lNw+v5ujRhYrcdMkrP3rc1ON8g7FB/HlltYXcegUXNO4J2pz8ZVdCZw74n+g2FCfvH MiVXlaNBNZKt0TUYWaZ+6Qp/QvYUNFDKWGfwQ3UE41Bgsi/XPs82Bg5L/EXT//NBGF0JWZQcN 4GInRZn0GChAHH3cGmiizoOkGOeS/7KzGPtY9xQfqBvVJoqooZh7+SWEl4jgRz+ry875fOCBF g3eER5L8nxAXg4qKPuXL9/Pu4wds8RwIEZSr2l1k1Mp//2HuhStgZvdSNXRgxnrR3Xt2oTjg3 WXALHET9Ma/4MI/lowHXqyOo4e1sFMBRGAr4lkD52MLG7td8/53TZJ3yJAm1ym9bEapuaJ2g9 tVPXnixfMlF9EwKvmgFaM+NzOnRaZyx4mkWEEF0+4FQ8eYIO+bwftF8TlCDmXJnVvfPlC21jR L6NGvN9FFLbOU9UCTINpcxNkS7XBgZTTWtP66JaeKiTSdIfFRsdML48yn4IxHchWU+SJPGZIq 0H83UoycsAezzHskr6alvoL5Ey6kCo4IMaazmridU+kvdrWXm3H3mRcGRr07VC6p/8pAti4pH EvgrDQYsEClIU6ZNzA3/ES5XQrDAmVbfNqvlSYeLID+ctuX1WkcnL0Sj0ox8QVOvQcECpPu9z oY5aGane8I1w01GFldLp6bI04LrV8RVhNk3rjFz5yq9VT/9a1zfbPaYFFIaKQL26HrhsrC1um YkKz+vSafDQXSCxXj0oEn75iYRJRjX+cnbPTy+TXZqcvfk1nyc9CO1jxt1Xc5XV0wRXWNt9bX LiQGJ80ACaHIh2/lTTIehq5B08Ctw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25818 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > You can evaluate this code from emacs -Q to have a frame gradually moved > in steps of 200 px from position ((top . 1) (left . 1)) until it's just > past the right edge of the display (more or less), and then come back > again: ... > On GNU/Linux and MS Windows the frame behaves as expected: when the > frame parameters are changed to bring it back onscreen (step 2), the > frame becomes visible again. On OS X 10.6 the frame stays off screen, > however, and I can't find any way to put it back on screen. You can > change the frame parameters for `top' and `left', and they'll stick, but > they don't actually seem to have any effect. > > Can someone reproduce this on a more recent OS X? Maybe the problem is > fixed in newer versions. FWIW this seems OS X specific behavior. Compare http://superuser.com/questions/55341/move-an-off-screen-window-back-on-screen-on-mac-os-x http://osxdaily.com/2013/08/14/move-window-back-on-screen-mac-os-x/ http://www.gottabemobile.com/how-to-move-an-os-x-window-thats-stuck-off-screen/ http://apple.stackexchange.com/questions/709/how-to-retrieve-windows-that-have-moved-off-screen https://www.cnet.com/forums/discussions/bring-misplaced-off-screen-applications-back-to-your-desktop-380285/ martin From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 06:27:00 2017 Received: (at 25818) by debbugs.gnu.org; 26 Feb 2017 11:27:00 +0000 Received: from localhost ([127.0.0.1]:56302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chwyi-0001rx-Ef for submit@debbugs.gnu.org; Sun, 26 Feb 2017 06:27:00 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:51330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chwyg-0001rg-F8 for 25818@debbugs.gnu.org; Sun, 26 Feb 2017 06:26:58 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 008BB2237A for <25818@debbugs.gnu.org>; Sun, 26 Feb 2017 11:23:43 +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-type:content-type:mime-version:message-id:in-reply-to :date:date:references:subject:subject:to:from:from; s=dkim; t= 1488108221; x=1488972222; bh=LAwYlSeeccylGr+UtC8qdW4+CRkbcY6Un4y If2GrptA=; b=Yx0ZWcAVeGKYPOXqGsqs1ihu4CfBmgro6jVKAFonmh5ad6GKS5J n01jPTa+RQWT2OBetKRq67jpneBoJhFE2Kd4Ep5OizFOYVy8x05RnulKGw70tdup riKNyzgo4/RqiamkopThsuKH/UPpeu/tZt7S9yh3ppvTcMf9dGXvY90U= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 VYY3stxjGs6r for <25818@debbugs.gnu.org>; Sun, 26 Feb 2017 11:23:41 +0000 (UTC) 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 0926622367; Sun, 26 Feb 2017 11:23:40 +0000 (UTC) From: charles@aurox.ch (Charles A. Roelli) To: martin rudalics Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> Date: Sun, 26 Feb 2017 12:26:46 +0100 In-Reply-To: <58AEA232.4000708@gmx.at> (martin rudalics's message of "Thu, 23 Feb 2017 09:49:54 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 10:40:17 2017 Received: (at 25818) by debbugs.gnu.org; 26 Feb 2017 15:40:17 +0000 Received: from localhost ([127.0.0.1]:56916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci0vn-00017U-VP for submit@debbugs.gnu.org; Sun, 26 Feb 2017 10:40:17 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:51518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci0vl-00017F-C5 for 25818@debbugs.gnu.org; Sun, 26 Feb 2017 10:40:13 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 8FD492237A for <25818@debbugs.gnu.org>; Sun, 26 Feb 2017 15:37:00 +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-type:content-type:mime-version:message-id:in-reply-to :date:date:references:subject:subject:to:from:from; s=dkim; t= 1488123419; x=1488987420; bh=ARyW9ghe7zuBn2Mx50/LUzmdMpPCjvTmTEL RyRFyYn8=; b=AqzaQfInGnep0qlEDgNW9zHAIyD3zKcL351TDktOejJTXK129Vg B0MDCT2SSM6/AglP8fWjEgYjGmY+yZDRcnlIPojyZOhSiOtR2+BmtTZZWkinea/2 30LoWvVo8pe8vpGOCPW6SaM93kF/3NFpjKKaxVMr2SjZzBn5r5F3K4ps= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 YHuPkET-4FQy for <25818@debbugs.gnu.org>; Sun, 26 Feb 2017 15:36:59 +0000 (UTC) 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 E17182233E; Sun, 26 Feb 2017 15:36:58 +0000 (UTC) From: charles@aurox.ch (Charles A. Roelli) To: martin rudalics Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> Date: Sun, 26 Feb 2017 16:40:04 +0100 In-Reply-To: (Charles A. Roelli's message of "Sun, 26 Feb 2017 12:26:46 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 11:46:02 2017 Received: (at 25818) by debbugs.gnu.org; 26 Feb 2017 16:46:02 +0000 Received: from localhost ([127.0.0.1]:56969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci1xS-0006Hg-4R for submit@debbugs.gnu.org; Sun, 26 Feb 2017 11:46:02 -0500 Received: from mout.gmx.net ([212.227.17.20]:62637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci1xP-0006HA-TM for 25818@debbugs.gnu.org; Sun, 26 Feb 2017 11:46:00 -0500 Received: from [192.168.1.100] ([213.162.68.101]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LcEPJ-1c11l12TgL-00jdPM; Sun, 26 Feb 2017 17:45:46 +0100 Message-ID: <58B30634.1090904@gmx.at> Date: Sun, 26 Feb 2017 17:45:40 +0100 From: martin rudalics MIME-Version: 1.0 To: "Charles A. Roelli" Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:hpkyyVNFkaZ1OFEDbVld2qoi8o7PYrAtrTja82vGYRHKMeJE4GN 4/cKZHjASZ3erhrSvotzDtibC5v5e0XDJnULtE+fNtz0gU/tstnDYabUzfLJMKhzeE15tg9 doAWkPVd4c8gYImo/IO0aslIkgh9qnfkC3LEd51Oo2FnUk/jnLBudR6pjbt2qAsbZAqzyL/ wzILXPlNr9jEVdEEDxSfA== X-UI-Out-Filterresults: notjunk:1;V01:K0:MCsjbfp2YsQ=:0SuUQYnp2C74M1hvaD0SZ/ 5IfWAVqhrW22qRLV1kR3bywZi+BldxawEB979sLyKJdotOIdkjStbjtSCX2eoJ4VkO+Cti3pv k1WuBlaKcj6zfxIYiQ7KK+nD2+a1SZwqCZHtGmu+n/ibl1nw3UxHChArlB+izwuvG3zq0zTEK crDJrdSFnCIMYePFRv1Ng5hxett7JGbGrPzftJ7C52VSONq+dENvB0EpknOpcRGOiDZQqBuFJ ut37KVj8wvV37j5njYguGWHr6qrGb1/zW5Elqq8IgLGuEmmruGqAbNdUSrrQL1IEAyOWoI1kH ejJA9ioc6imYZnVBE35EyoRUQLaDpC1dWGAy1uBO4YajhRyzwLCBaa7c4R98E0/8qlP+fS95Q zRyr8fn2C0uLBQtABf1NdB9oyi/yANvWfXvCtOy503aRXMo6ekDrno1BUzD6pOp3CdOGbdiIO B9lKOMglFzyEVcDrRFyydMJIGjVf+YXgkUZ2kBVqpS912Svy+PClpr7+uXFMc3SdEqgTRSyyV JirgvE/1d/R18V5lVsqNYWQL3fZuF0pxwj7uU/NI0tXJUTg+fMuGpQOiR60dg9nUjLmmAh6OC o/FhsG2x8Y80bUz/rloeBA6PiJlrrvHdojD0Tykfl+2b31YxnQ5yNm+b5DLOCwuHECPN5tbRI TXZnLCOf0ctJ6FjXliuAurG5KpMiiOBkLqO5ttQuovCI3ODJkmFDFLCgxtboCJq1918dvW6fL uHuGGv1nXrpsOJBwy3F5MbHFBUA4mBlf9sdosf7JCC33H1VR0/2/HkbXg1hf8nxarmSwnE5+m 3O4AvuvyrrHscaxKeOrhTWfoOg/pg== X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> 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, [...] > 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. [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.20 listed in list.dnswl.org] 2.7 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [213.162.68.101 listed in dnsbl.sorbs.net] -0.6 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.20 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >> 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, [...] > 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. [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.20 listed in list.dnswl.org] -0.6 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.20 listed in wl.mailspike.net] 2.7 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [213.162.68.101 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) >> 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 tho= se > 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.) martin From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 14:42:53 2017 Received: (at 25818) by debbugs.gnu.org; 26 Feb 2017 19:42:53 +0000 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 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 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 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) 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) From: charles@aurox.ch (Charles A. Roelli) To: martin rudalics Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> Date: Sun, 26 Feb 2017 20:42:37 +0100 In-Reply-To: <58B30634.1090904@gmx.at> (martin rudalics's message of "Sun, 26 Feb 2017 17:45:40 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 03:05:48 2017 Received: (at 25818) by debbugs.gnu.org; 27 Feb 2017 08:05:48 +0000 Received: from localhost ([127.0.0.1]:57482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciGJY-0000Pc-4o for submit@debbugs.gnu.org; Mon, 27 Feb 2017 03:05:48 -0500 Received: from mout.gmx.net ([212.227.17.22]:50663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciGJW-0000PQ-D9 for 25818@debbugs.gnu.org; Mon, 27 Feb 2017 03:05:47 -0500 Received: from [192.168.1.100] ([213.162.68.43]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MCxfb-1cYfnr30wl-009f8L; Mon, 27 Feb 2017 09:05:24 +0100 Message-ID: <58B3DDBA.6060003@gmx.at> Date: Mon, 27 Feb 2017 09:05:14 +0100 From: martin rudalics MIME-Version: 1.0 To: "Charles A. Roelli" Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:wX2e/H+pstbJaXk3Tb9VQYg4QiuXrSCP4B1D6gWb5o9oztXULSZ 97AxWEiUqBOvdwyFoT/n//SJJHAUzJTkhnz0BaBJu8kY6ReMAS2/vvRdEjAmQS0MCirCkEN jTuTcXLGep4SWMSrY5qcZ2ZXXo8zTZIrbcLSZp17gTsD7DAe/3VM13Pf03klSNLTKViMUB7 NsXqfJg2p3+WbRhW1ioOA== X-UI-Out-Filterresults: notjunk:1;V01:K0:bYRgq2b4cOM=:oq31fpE7FJzYUH1bin2/bb O1z2RkenCo5EF91bKTkkfxP5WJiDOkBcxglNquvAkxPr6aLw8BgHIGczZLPim7Zb8cxHCZzpd CV3PzwoVf0E0wjuPq1fIsBlw6ivEh/KE/eoIDuehZoRu+Z3SlAtotze049c0iE8x6a5I069oX NZgzRDPOSCvP1aAACPqwPZk7cRxmCK4+xKRotvUnHp5+JDqyMYGi75XYpDNWYjLb96uvOm8DZ NBSsIDgAvmQhuJZxbdlmvqVtlH0c4PMohY/0XCf+9ht0CqFYpsTtyy1YsYNaU3dw/2QiyUP7B dErNIEPPjEZ3e1Ab4eNxxmvjdpQlaCI2VJfPT9RW1pGNs8W41iSeOGUajDmZD7owdpjHBZacW xIkn+cIE6HPOeUjti8JeC7BImaAJB3n3T6liVLnZM2bwT9XH4+P8ObQnEh0Q8zeLr/8do6nX2 3ZalFfLVIlkMkwiVDT5rneHGXd5e2Hvk39ufu6z76RyqEvoSubucNa9pFELQSI2cg0czzQD1p NlIu6I0OX2DzoqzHD8RPHxlIAM0kwbveETM7Fjb5FZvdsyPMM0YXPnst8oeq912Ujy1lBf79S Lr7H1KHJXe7zfsfdAuX4HSq9F+umFKqNw5SoekF5Ul63locvLxp49bC6VK3I9gPHb/4mhe0y+ cDZSG0deHF8lX4o6kGHctrOw6DM+VnaPwAJxtCMAom8hXNNXvwUzPYMWgjbrpX4aUX/qgbTsP 1nPE9vSq/t0V0eR8DDVSFCIzGM3ZtM2w+XMeF9e3ow717L2z4/Czu9yi64cZTbgg0SUyHe1iB LLPybMCKwSxBMpeSp6rVJKc2ZM0LWYo6JDbRBXXUuZLTIV+nuIUVva+3KEicjKSvggYZFvV5q OqpD4zxhrzqoWcp1oVckupVwYHNSq0TRkcwgpJnYU0pxJtyTkvOewJTtKZQzOOM8qB6iLH8Mj s4v1e/d8Y8loCjLsNPP4ohpzEjn5DE2EMXGwWUCaQrahRXXz7BiFlJV0JFfYSCqeGVSi3xZf/ eoCEp4L6W1Rp+dUaEkZZtZ76VOamouQKqkoy6w2n7dDwwe5f/MrFvarUJq27IqqczA== X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > 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 = (+ 1280 1050). Second monitor is > 1050 pixels wide. [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [213.162.68.43 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) -0.6 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.22 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.22 listed in list.dnswl.org] X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > 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 = (+ 1280 1050). Second monitor is > 1050 pixels wide. [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.22 listed in list.dnswl.org] -0.6 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.22 listed in wl.mailspike.net] 2.7 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [213.162.68.43 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) > 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 = (+ 1280 1050). Second monitor is > 1050 pixels wide. So the problem occurs only with the second monitor plugged in? > In both the case of 24.3 and 24.4 with no external monitor attached, > (display-pixel-width) returns 1280. And there is no problem in this case with 24.4? > 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. The code was changed in two tranches 2013-05-20 YAMAMOTO Mitsuharu 2013-07-04 YAMAMOTO Mitsuharu I'll CC him - maybe he can help us solving this issue in a more general way. > 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). Do you mean that the value is already wrong for the primary monitor or that the value simply does not account for the second monitor? > 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. In any case we have to change ediff-wind.el in order to fix the issue at hand. martin From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 05:34:34 2017 Received: (at 25818) by debbugs.gnu.org; 27 Feb 2017 10:34:34 +0000 Received: from localhost ([127.0.0.1]:57543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciIdV-0003jZ-P4 for submit@debbugs.gnu.org; Mon, 27 Feb 2017 05:34:33 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:52439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciIdT-0003jM-In for 25818@debbugs.gnu.org; Mon, 27 Feb 2017 05:34:33 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 6921322383 for <25818@debbugs.gnu.org>; Mon, 27 Feb 2017 10:31:16 +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-type:content-type:mime-version:message-id:in-reply-to :date:date:references:subject:subject:to:from:from; s=dkim; t= 1488191474; x=1489055475; bh=HAHIPAw19kC25vcCtcfZob6xACHzKhYCsSl UwkhSz2E=; b=ZGNnRCZt/tUUWOW3qcVpZEGGnHQEetBKooelKkikcW2T4YVMoLY wiquIX8h62S9C+R87P15bueYAT3x0bSajUhQSebtafwlYHCDCF6NOswV3CApHyFl iDcyjlSbYdYl09iaGB0SiVZQZmN7Bh3caCr365ytz9rnif5DPWxO5+ds= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 3xK1crY6EV7Y for <25818@debbugs.gnu.org>; Mon, 27 Feb 2017 10:31:14 +0000 (UTC) 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 191B52236B; Mon, 27 Feb 2017 10:31:13 +0000 (UTC) From: charles@aurox.ch (Charles A. Roelli) To: martin rudalics Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> Date: Mon, 27 Feb 2017 11:34:20 +0100 In-Reply-To: <58B3DDBA.6060003@gmx.at> (martin rudalics's message of "Mon, 27 Feb 2017 09:05:14 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On Mon, Feb 27 2017 at 09:05:14 am, martin rudalics wrote: >> 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 = (+ 1280 1050). Second monitor is >> 1050 pixels wide. > > So the problem occurs only with the second monitor plugged in? The problem occurs (in 24.4) regardless of how many monitors are plugged in, and it may not be directly related to `display-pixel-width'. > >> In both the case of 24.3 and 24.4 with no external monitor attached, >> (display-pixel-width) returns 1280. > > And there is no problem in this case with 24.4? No, as above, the problem always occurs with 24.4, regardless of the number of monitors connected. > >> 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. > > The code was changed in two tranches > > 2013-05-20 YAMAMOTO Mitsuharu > > 2013-07-04 YAMAMOTO Mitsuharu > > I'll CC him - maybe he can help us solving this issue in a more general > way. Thanks. > >> 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). > > Do you mean that the value is already wrong for the primary monitor or > that the value simply does not account for the second monitor? The value does not account for the second monitor (but is correct for the primary monitor). This is the behavior that was fixed in 24.4. >> 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. > > In any case we have to change ediff-wind.el in order to fix the issue at > hand. We could, but it would be better to restore Emacs 24.3's behavior in OS X, where frames are effectively prevented from moving off-screen. There is no point in allowing a frame to be moved off-screen, IIUC, since the frame seems to never reappear no matter what we do with it. > > > martin From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 27 15:47:57 2017 Received: (at 25818) by debbugs.gnu.org; 27 Feb 2017 20:47:57 +0000 Received: from localhost ([127.0.0.1]:58730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciSD7-00088r-Gz for submit@debbugs.gnu.org; Mon, 27 Feb 2017 15:47:57 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:53026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciSD5-00088b-K3 for 25818@debbugs.gnu.org; Mon, 27 Feb 2017 15:47:56 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id E7B6722384 for <25818@debbugs.gnu.org>; Mon, 27 Feb 2017 20:44:37 +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-type:content-type:mime-version:message-id:in-reply-to :date:date:references:subject:subject:to:from:from; s=dkim; t= 1488228275; x=1489092276; bh=fRLrS7z6ASaOOlYACuTDjgHOvBjEetSbAL7 KZJplbLo=; b=AssgN6vooG9D4kXvtEJwA8qj0SN158FaVra3tK5vbSn3UUaKZnn DBJEVHmFPmdRa5rrJhlXMMW6U0iuMFRXO5RnSv6gl5payK8q0F/cukYYZN1uZHC5 qy+/MqSK8nJJRwYDidg1V0pTUTpRfe6EgJ/eWLg1ZriUinjlkIjngjyY= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 7LgD3tgnRIzV for <25818@debbugs.gnu.org>; Mon, 27 Feb 2017 20:44:35 +0000 (UTC) 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 71BD622365; Mon, 27 Feb 2017 20:44:34 +0000 (UTC) From: charles@aurox.ch (Charles A. Roelli) To: martin rudalics Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> Date: Mon, 27 Feb 2017 21:47:41 +0100 In-Reply-To: <58B3DDBA.6060003@gmx.at> (martin rudalics's message of "Mon, 27 Feb 2017 09:05:14 +0100") Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, andlind@gmail.com, YAMAMOTO Mitsuharu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Bisecting between emacs-24.3 and emacs-24.4 led me to commit 680e6b8c5a28489733df544edb074fd29d0522a0, which introduces the regression. There is also a possibly related commit two hours later, 1269a680862a9bc6cd65e3d26ef05f68c7521632. Commit 680e6b8c introduces the behavior observed in 24.4, where a frame is not constrained to the screen area. Also interesting is that `display-pixel-width' works correctly (for multiple monitors as well, that is) in the commit and the commits immediately preceding it, so it may only be tangentially related. I'm attaching the changeset of 680e6b8c and CCing the author. I looked into constrainFrameRect, and it seems to have different behavior depending on whether "Spaces" are available (introduced in OS X 10.9 apparently). Might also have something to with the issue at hand. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=680e6b8c-2013-12-19-frame-handling.diff diff --git a/src/ChangeLog b/src/ChangeLog index d6db5b3..e7f30f2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,16 @@ 2013-12-19 Anders Lindgren + * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros. + (ns_constrain_all_frames, x_set_offset): Remove assignment to + dont_constrain. + (updateFrameSize:, windowWillResize:toSize:): Add trace. + (constrainFrameRect): Remove special case nr_screens == 1. + Don't constrain size to size of view. + + * nsterm.h (ns_output): Remove dont_constrain. + +2013-12-19 Anders Lindgren + * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT. 2013-12-18 Paul Eggert diff --git a/src/nsterm.h b/src/nsterm.h index 0215f13..faf8271 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -687,9 +687,6 @@ struct ns_output /* This is the Emacs structure for the NS display this frame is on. */ struct ns_display_info *display_info; - /* Non-zero if we want to constrain the frame to the screen. */ - int dont_constrain; - /* Non-zero if we are zooming (maximizing) the frame. */ int zooming; }; diff --git a/src/nsterm.m b/src/nsterm.m index 99c061d..d7c2f38 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -79,6 +79,28 @@ int term_trace_num = 0; #define NSTRACE(x) #endif +/* Detailed tracing. "S" means "size" and "LL" stands for "lower left". */ +#if 1 +int term_trace_num = 0; +#define NSTRACE_SIZE(str,size) fprintf (stderr, \ + "%s:%d: [%d] " str \ + " (S:%.0f x %.0f)\n", \ + __FILE__, __LINE__, ++term_trace_num,\ + size.height, \ + size.width) +#define NSTRACE_RECT(s,r) fprintf (stderr, \ + "%s:%d: [%d] " s \ + " (LL:%.0f x %.0f -> S:%.0f x %.0f)\n", \ + __FILE__, __LINE__, ++term_trace_num,\ + r.origin.x, \ + r.origin.y, \ + r.size.height, \ + r.size.width) +#else +#define NSTRACE_SIZE(str,size) +#define NSTRACE_RECT(s,r) +#endif + extern NSString *NSMenuDidBeginTrackingNotification; /* ========================================================================== @@ -605,7 +627,6 @@ ns_constrain_all_frames (void) NSView *view = FRAME_NS_VIEW (f); /* This no-op will trigger the default window placing * constraint system. */ - f->output_data.ns->dont_constrain = 0; [[view window] setFrameOrigin:[[view window] frame].origin]; } } @@ -1225,7 +1246,6 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_grav) #endif /* Constrain the setFrameTopLeftPoint so we don't move behind the menu bar. */ - f->output_data.ns->dont_constrain = 0; [[view window] setFrameTopLeftPoint: NSMakePoint (SCREENMAXBOUND (f->left_pos), SCREENMAXBOUND ([fscreen frame].size.height @@ -5684,10 +5704,13 @@ not_in_argv (NSString *arg) NSRect wr = [window frame]; int extra = 0; int oldc = cols, oldr = rows; - int oldw = FRAME_PIXEL_WIDTH (emacsframe), - oldh = FRAME_PIXEL_HEIGHT (emacsframe); + int oldw = FRAME_PIXEL_WIDTH (emacsframe); + int oldh = FRAME_PIXEL_HEIGHT (emacsframe); int neww, newh; + NSTRACE (updateFrameSize); + NSTRACE_SIZE ("Original size", NSMakeSize (oldw, oldh)); + if (! [self isFullscreen]) { #ifdef NS_IMPL_GNUSTEP @@ -5731,6 +5754,8 @@ not_in_argv (NSString *arg) sz.width = FRAME_COLUMN_WIDTH (emacsframe); sz.height = FRAME_LINE_HEIGHT (emacsframe); [win setResizeIncrements: sz]; + + NSTRACE_SIZE ("New size", NSMakeSize (neww, newh)); } [view setFrame: NSMakeRect (0, 0, neww, newh)]; @@ -5744,6 +5769,7 @@ not_in_argv (NSString *arg) int extra = 0; NSTRACE (windowWillResize); + NSTRACE_SIZE ("Original size", frameSize); /*fprintf (stderr,"Window will resize: %.0f x %.0f\n",frameSize.width,frameSize.height); */ if (fs_state == FULLSCREEN_MAXIMIZED @@ -6903,19 +6929,39 @@ if (cols > 0 && rows > 0) NSUInteger nr_screens = [[NSScreen screens] count]; struct frame *f = ((EmacsView *)[self delegate])->emacsframe; NSTRACE (constrainFrameRect); + NSTRACE_RECT ("input", frameRect); - if (nr_screens == 1) - { - NSRect r = [super constrainFrameRect:frameRect toScreen:screen]; - return r; - } - - if (f->output_data.ns->dont_constrain - || ns_menu_bar_should_be_hidden ()) + if (ns_menu_bar_should_be_hidden ()) return frameRect; - f->output_data.ns->dont_constrain = 1; - return [super constrainFrameRect:frameRect toScreen:screen]; + /* The default implementation does two things 1) ensure that the top + of the rectangle is below the menu bar (or below the top of the + screen) and 2) resizes windows larger than the screen. As we + don't want the latter, a smaller rectangle is used. */ +#define FAKE_HEIGHT 64 + float old_top = frameRect.origin.y + frameRect.size.height; + NSRect r; + r.size.height = FAKE_HEIGHT; + r.size.width = frameRect.size.width; + r.origin.x = frameRect.origin.x; + r.origin.y = old_top - FAKE_HEIGHT; + + NSTRACE_RECT ("input to super", r); + + r = [super constrainFrameRect:r toScreen:screen]; + + NSTRACE_RECT ("output from super", r); + + float new_top = r.origin.y + FAKE_HEIGHT; + if (new_top < old_top) + { + frameRect.origin.y = new_top - frameRect.size.height; + } + + NSTRACE_RECT ("output", frameRect); + + return frameRect; +#undef FAKE_HEIGHT } @end /* EmacsWindow */ --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 05:12:41 2017 Received: (at 25818) by debbugs.gnu.org; 28 Feb 2017 10:12:41 +0000 Received: from localhost ([127.0.0.1]:59093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cielt-0000DM-0j for submit@debbugs.gnu.org; Tue, 28 Feb 2017 05:12:41 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:53468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cielp-0000D6-Fs for 25818@debbugs.gnu.org; Tue, 28 Feb 2017 05:12:38 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 3D2DF22388 for <25818@debbugs.gnu.org>; Tue, 28 Feb 2017 10:09:23 +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-type:content-type:mime-version:message-id:in-reply-to :date:date:references:subject:subject:to:from:from; s=dkim; t= 1488276561; x=1489140562; bh=HIE6hMdhEtiqp5NgIK0vn8b0i3z/03ItsaW +x+93heQ=; b=U3decUWQ+b6ke2JPQM77F2tA/twL/rhvbDLP1/pSpdfXc1CjW1v 9jcbV/PRm3imbuFUmBS/V4rwYQUwt13N/Kg18+KMdVvphurc7tj58uAFRq7OAB3q fGtdgahp8yrMWY81NVXdcSD9SSOFV5xJihM5T3IE1MFjwKf4VrahfgPQ= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 5PlO0181FVi4 for <25818@debbugs.gnu.org>; Tue, 28 Feb 2017 10:09:21 +0000 (UTC) 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 456C12236B; Tue, 28 Feb 2017 10:09:21 +0000 (UTC) From: charles@aurox.ch (Charles A. Roelli) To: martin rudalics Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> Date: Tue, 28 Feb 2017 11:12:27 +0100 In-Reply-To: (Charles A. Roelli's message of "Mon, 27 Feb 2017 21:47:41 +0100") Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, jan.h.d@swipnet.se, YAMAMOTO Mitsuharu , andlind@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The attached patch against master fixes the issue on OS X 10.6 by constraining frames to the visible area. Behavior with OS X 10.9+ (and "Spaces") still needs testing. The patch also fixes https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D14713, which has reappeared since it was fixed (at least it has reappeared on 10.6). Also CCing Jan Dj=C3=A4rv who worked on this area of the code previously (s= ee e61a31bf999b37f32616e5159196d179657ad788). --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-nsterm.m-constrainFrameRect-toScreen-Constrain-frame.patch >From cdc3c31ef47bad37899575c78aa888b4f0bf24f2 Mon Sep 17 00:00:00 2001 From: Charles A. Roelli Date: Tue, 28 Feb 2017 10:58:25 +0100 Subject: [PATCH] Constrain frames in all versions of OS X * nsterm.m (constrainFrameRect:toScreen:): Constrain frames in all versions of OS X. Fixes: debbugs:25818 --- src/nsterm.m | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 28764c8..9b479ad 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7841,17 +7841,9 @@ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen NSTRACE_ARG_RECT (frameRect)); #ifdef NS_IMPL_COCOA -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 - // If separate spaces is on, it is like each screen is independent. There is - // no spanning of frames across screens. - if ([NSScreen screensHaveSeparateSpaces]) - { - NSTRACE_MSG ("Screens have separate spaces"); - frameRect = [super constrainFrameRect:frameRect toScreen:screen]; - NSTRACE_RETURN_RECT (frameRect); - return frameRect; - } -#endif + frameRect = [super constrainFrameRect:frameRect toScreen:screen]; + NSTRACE_RETURN_RECT (frameRect); + return frameRect; #endif return constrain_frame_rect(frameRect, -- 1.7.4.4 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 08:21:04 2017 Received: (at 25818) by debbugs.gnu.org; 28 Feb 2017 13:21:04 +0000 Received: from localhost ([127.0.0.1]:59191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cihiC-0006ct-5r for submit@debbugs.gnu.org; Tue, 28 Feb 2017 08:21:04 -0500 Received: from mail-ua0-f178.google.com ([209.85.217.178]:35984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cihiA-0006bb-FK for 25818@debbugs.gnu.org; Tue, 28 Feb 2017 08:21:03 -0500 Received: by mail-ua0-f178.google.com with SMTP id 72so12648143uaf.3 for <25818@debbugs.gnu.org>; Tue, 28 Feb 2017 05:21:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mzZjpweb0BTAwf0uiKfqxpHYNHZPvKlBE4pNmXVkojg=; b=DTuUNMXNG1rXek6Mp7P4UT/OgxbuUr9JB4VbclwMIQSzeEeiAHx6UVzDpBBdENqGBB CpWQVF8iihf5CfqZR+WG3Fz6rmdZegMVd161V2OOqfN3Z5IfrZ5Z1Qb4cAHjo1nEdLR7 wFxd2NSQCM60dV8nLLctfUsydguoTVpgYpL6cOcrSpqIdnkVQBirJPdmwcu1ciSr9Vim Y83DryhFW+A/ZhGhIZg9xdkzsz+LUZ2HRRtj95j9onMlZuAZgMgZsAoVx9ua0/AJzNkw l/zd2zXmgKobOs9IXpy1k22AA35WUNF3dVDdoe21m6lsEDC5RABh+40nm29VlTWIt90D wQuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mzZjpweb0BTAwf0uiKfqxpHYNHZPvKlBE4pNmXVkojg=; b=ttod0vw0GykCtVqqtFK127mj26uljCaouvww6HuZjK1MZJFnZzq/3j59XpzTqgD36s +DIdAYtAxFlAfIdLd9zl9jBcZxTHGwcKVZdhsSIjxAZD1cOVKNga1KHdNUFEVbZQyP+j gmu4grmQBiBf7TAfm2uRuNbCBfhSHA7tVREhwqoi0/fJyFhd8SpnESVY+MHU1hyflDk4 am2fX0c9eG+CXvuX39q3nTagiW9yRix8FH+dac4e/MkU6KV7cg8TKqA9wXKfjVf7A6Py WoYh2HKaZ10GCwOIxapydcz1hLARWjmbq95RYvxRhr164bfrKqIWTAUf22vu3nH13A8S RdqQ== X-Gm-Message-State: AMke39mLxBXyELcL7svheTeurqhKlMIBHtH/NJYwXhBiAKOMDJaqyau4m0U31jXcQ6i3P3uaO7MlAXfODLHK9Q== X-Received: by 10.176.75.1 with SMTP id h1mr853010uaf.145.1488288056693; Tue, 28 Feb 2017 05:20:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.242.15 with HTTP; Tue, 28 Feb 2017 05:20:55 -0800 (PST) In-Reply-To: References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> From: Anders Lindgren Date: Tue, 28 Feb 2017 14:20:55 +0100 Message-ID: Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: "Charles A. Roelli" Content-Type: multipart/mixed; boundary=f403045e6976f1dabd054997102b X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25818 Cc: martin rudalics , YAMAMOTO Mitsuharu , 25818@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --f403045e6976f1dabd054997102b Content-Type: multipart/alternative; boundary=f403045e6976f1dab60549971029 --f403045e6976f1dab60549971029 Content-Type: text/plain; charset=UTF-8 Hi! I'm the author behind the changes you are discussing. Emacs 24.3 demonstrates a number of problems when you want to stretch Emacs across two screens and also when placing the title bar above the top of the screen (which is very useful when `ns-auto-hide-menu-bar' is non-nil). Applying the suggested patch would only reintroduce those problems. A better solution would be to add to code to check if the Emacs frame is outside any monitor, and then (and only then) call the constrainFrameRect method of the parent class. Also, if I remember correctly, 24.3 behaved differently when you had one monitor compared to multiple monitors. I removed this, as I didn't see the point of it, and because if introduced an extra level of complexity when it came to testing. When it comes to `display-pixel-width', it should return the combined width of side-by-side monitors, so 24.4 and newer Emacs versions behave correctly. I have attached a test file I used when I worked with the NS port. Anyway, I'm glad that you have looked into this. The number of people actively working on the NS port are close to zero (I threw in the towel about a year ago, simply because I couldn't find the time I needed to spend on it). If you are interested in contributing, you can look at the "NeXTstep port" section of the "TODO" file. -- Anders On Mon, Feb 27, 2017 at 9:47 PM, Charles A. Roelli wrote: > Bisecting between emacs-24.3 and emacs-24.4 led me to commit > 680e6b8c5a28489733df544edb074fd29d0522a0, which introduces the > regression. There is also a possibly related commit two hours later, > 1269a680862a9bc6cd65e3d26ef05f68c7521632. > > Commit 680e6b8c introduces the behavior observed in 24.4, where a frame > is not constrained to the screen area. Also interesting is that > `display-pixel-width' works correctly (for multiple monitors as well, > that is) in the commit and the commits immediately preceding it, so it > may only be tangentially related. > > I'm attaching the changeset of 680e6b8c and CCing the author. > > I looked into constrainFrameRect, and it seems to have different > behavior depending on whether "Spaces" are available (introduced in OS X > 10.9 apparently). Might also have something to with the issue at hand. > > --f403045e6976f1dab60549971029 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

I'm the author behind the chang= es you are discussing.

Emacs 24.3 demonstrates a n= umber of problems when you want to stretch Emacs across two screens and als= o when placing the title bar above the top of the screen (which is very use= ful when `ns-auto-hide-menu-bar' is non-nil). Applying the suggested pa= tch would only reintroduce those problems.

A bette= r solution would be to add to code to check if the Emacs frame is outside a= ny monitor, and then (and only then) call the constrainFrameRect method of = the parent class.

Also, if I remember correctl= y, 24.3 behaved differently when you had one monitor compared to multiple m= onitors. I removed this, as I didn't see the point of it, and because i= f introduced an extra level of complexity when it came to testing.

When it comes to `display-pixel-width', it should retu= rn the combined width of side-by-side monitors, so 24.4 and newer Emacs ver= sions behave correctly.

I have attached a test fil= e I used when I worked with the NS port.

Anyway, I= 'm glad that you have looked into this. The number of people actively w= orking on the NS port are close to zero (I threw in the towel about a year = ago, simply because I couldn't find the time I needed to spend on it). = If you are interested in contributing, you can look at the "NeXTstep p= ort" section of the "TODO" file.

= =C2=A0 =C2=A0 -- Anders


On Mon, Feb 27, 2017 at 9:47 PM, Charles A= . Roelli <charles@aurox.ch> wrote:
Bisecting between emacs-24.3 and emacs-24.4 led me to commit
680e6b8c5a28489733df544edb074fd29d0522a0, which introduces the
regression.=C2=A0 There is also a possibly related commit two hours later,<= br> 1269a680862a9bc6cd65e3d26ef05f68c7521632.

Commit 680e6b8c introduces the behavior observed in 24.4, where a frame
is not constrained to the screen area.=C2=A0 Also interesting is that
`display-pixel-width' works correctly (for multiple monitors as well, that is) in the commit and the commits immediately preceding it, so it
may only be tangentially related.

I'm attaching the changeset of 680e6b8c and CCing the author.

I looked into constrainFrameRect, and it seems to have different
behavior depending on whether "Spaces" are available (introduced = in OS X
10.9 apparently).=C2=A0 Might also have something to with the issue at hand= .


--f403045e6976f1dab60549971029-- --f403045e6976f1dabd054997102b Content-Type: application/octet-stream; name="ns-frame-test.el" Content-Disposition: attachment; filename="ns-frame-test.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_izpk3ske1 OzsgbnMtZnJhbWUtdGVzdC5lbCAtLS0gdGVzdCBmb3IgTmV4dFN0ZXAgKE1hYyBPUyBYKSBmcmFt ZSBwb3NpdGlvbmluZy4KCjs7IEF1dGhvcjogQW5kZXJzIExpbmRncmVuCgo7OyBUaGlzIGZpbGUg aXMgKm5vdCogaW50ZW5kZWQgdG8gYmUgbG9hZGVkIGludG8gRW1hY3MuIEluc3RlYWQsIGl0Cjs7 IGNvbnRhaW5zIGluZGl2aWR1YWwgZXhwcmVzc2lvbnMgdGhhdCBzaG91bGQgYmUgZXZhbHVhdGVk IG9uZSBieQo7OyBvbmUsIHdpdGggYWNjb21wYW55aW5nIG1hbnVhbCB0ZXN0IHN0ZXBzLgoKOzsg RnV0dXJlIGRldmVsb3BtZW50Ogo7Owo7OyAqIEFkZCBtb3JlIHRlc3QgY2FzZXMsIGxpa2UgcmVz b2x1dGlvbiBjaGFuZ2UsIGZyYW1lIHN0cmV0Y2hpbmcKOzsgICBtdWx0aXBsZSBzY3JlZW5zLCBh bmQgZHJhZ2dpbmcgYmV0d2VlbiBkaWZmZXJlbnQgc2l6ZWQgc2NyZWVucy4KOzsKOzsgKiBBdXRv bWF0aWMgdGVzdGluZyB1c2luZyBhIHVuaXQgdGVzdCBmcmFtZXdvcmssIGZvciBleGFtcGxlIGVy dC4KOzsKKGVycm9yICJZb3Ugc2hvdWxkIG5vdCBsb2FkIHRoaXMgZmlsZSwgcmVhZCB0aGUgZmls ZSBjb21tZW50cyBmb3IgZGV0YWlscyIpCgo7OyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tCjs7IEJhc2ljcwo7OwoKOzsgSW5pdGlhbGx5LCBFbWFjcyBzaG91bGQgYmUg cGxhY2VkIHVuZGVyIHRoZSBtZW51IGJhci4KCjs7IEFmdGVyIGVhY2ggdGVzdCBpbiB0aGlzIHNl Y3Rpb24sIGl0IHNob3VsZCBiZSBwb3NzaWJsZSB0byBkcmFnIHRoZQo7OyBmcmFtZSBhcm91bmQs IGJ1dCBpdCBzaG91bGQgbm90IGJlIHBvc3NpYmxlIHRvIGRyYWcgaXQgaW4gdW5kZXIgdGhlCjs7 IG1lbnUgYmFyLgoKOzsgVGhlIGZvbGxvd2luZyBzaG91bGQgbm90IHBsYWNlIHRoZSB3aW5kb3cg dW5kZXIgdGhlIG1lbnUgYmFyLgooc2V0LWZyYW1lLXBvc2l0aW9uIChzZWxlY3RlZC1mcmFtZSkg MCAtMTApCgo7OyBUaGUgZm9sbG93aW5nIHdpbGwgY3JlYXRlIGEgZnJhbWUgdGFsbGVyIHRoYW4g c2NyZWVuLiAoOTAgaXMKOzsgc3VpdGFibGUgZm9yIGEgMTIwMCBwaXhlbCBkaXNwbGF5LCB5b3Ug bWlsZWFnZSBtYXkgd2FyeS4pCjs7Cjs7IFRoZSBmcmFtZSBzaG91bGQgbm90IGJlIHJlc2l6ZWQg dG8gZml0IHRoZSBzY3JlZW4uCihzZXQtZnJhbWUtc2l6ZSAoc2VsZWN0ZWQtZnJhbWUpIDgwIDkw KQoKOzsgVGhlIGZvbGxvd2luZyBzaG91bGQgbW92ZSB0aGUgZnJhbWUgZG93biBhIGJpdC4gSXQg c2hvdWxkIG5vdCBiZQo7OyByZXNpemVkIHRvIGZpdCB0aGUgc2NyZWVuLgooc2V0LWZyYW1lLXBv c2l0aW9uIChzZWxlY3RlZC1mcmFtZSkgMCA1MCkKCgo7OyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tCjs7IEF1dG8gaGlkZSBtZW51Cjs7Cgo7OyBJbiB0aGlzIHNlY3Rp b24sIHRoZSBhdXRvLWhpZGUgZmVhdHVyZSBvZiB0aGUgbWVudSBiYXIgaXMKOzsgdGVzdGVkLiBB ZnRlciBlYWNoIHN0ZXAgaXQgc2hvdWxkIGJlIHBvc3NpYmxlIGRvIGRyYWcgdGhlIHdpbmRvdwo7 OyBhcm91bmQuIEl0IHNob3VsZCBub3QgYmUgcG9zc2libGUgdG8gZHJhZyB0aGUgd2luZG93IGZy b20gd2l0aGluCjs7IHRoZSBzY3JlZW4gdG8gYWJvdmUgdGhlIHNjcmVlbi4gSG93ZXZlciwgaWYg aXQgYWxyZWFkeSBpcyBhYm92ZSB0aGUKOzsgc2NyZWVuLCBpdCBzaG91bGQgYmUgcG9zc2libGUg dG8gZHJhZyBpdCBhcm91bmQgdGhlcmUuCgo7OyBTdGFydCB3aXRoIGEgZnJhbWUgc21hbGxlciB0 aGFuIHRoZSBzY3JlZW4uCihzZXQtZnJhbWUtc2l6ZSAoc2VsZWN0ZWQtZnJhbWUpIDgwIDUwKQoK OzsgQWZ0ZXIgdGhpcywgdGhlIG1lbnUgYmFyIHNob3VsZCBiZSBoaWRkZW4gKHVubGVzcyB0aGUg bW91c2UgcG9pbnRlcgo7OyBpcyBhdCB0aGUgdG9wIG9mIHRoZSBzY3JlZW4pLgooc2V0cSBucy1h dXRvLWhpZGUtbWVudS1iYXIgdCkKCjs7IFRoaXMgd2lsbCBwbGFjZSB0aGUgd2luZG93IHRpdGxl ICphYm92ZSogdGhlIHRvcCBvZiB0aGUgc2NyZWVuIChhcwo7OyBpbnRlbmRlZCkuCihzZXQtZnJh bWUtcG9zaXRpb24gKHNlbGVjdGVkLWZyYW1lKSAwIC0xMCkKCjs7IEZyYW1lIHdpbGwgYmUgaGln aGVyIHRoYW4gc2NyZWVuLgooc2V0LWZyYW1lLXNpemUgKHNlbGVjdGVkLWZyYW1lKSA4MCA5MCkK Cgo7OyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCjs7IEV4aXQgYXV0 byBoaWRlIG1lbnUKOzsKCjs7IFJlZGlzcGxheSB0aGUgbWVudSBiYXIuIEFmdGVyIHRoaXMsIHRo ZSBmcmFtZSBzaG91bGQgYmUgcGxhY2VkCjs7ICpiZWxvdyogdGhlIG1lbnUgYmFyLgooc2V0cSBu cy1hdXRvLWhpZGUtbWVudS1iYXIgbmlsKQoKCjs7IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0KOzsgUGl4ZWx3aXNlIHJlc2l6ZS4KOzsKCjs7IFRoZSBmb2xsb3dpbmcg dGVzdHMgYXNzdW1zIHRoYXQgdGhlIERvY2sgaXMgY29uZmlndXJlZCB0byBiZSBvbiB0aGUKOzsg Ym90dG9tIG9mIHRoZSBzY3JlZW4gYW5kIGluIGF1dG8taGlkZSBtb2RlLgoKCjs7IC0tLS0tLS0t LS0KOzsgUmVzdGFydCBFbWFjcy4KOzsKOzsgRXZhbHVhdGUgdGhlIGZvbGxvd2luZy4gVGhlIGZy YW1lIHNob3VsZCBzdHJldGNoIGZyb20gdGhlIG1lbnUgYmFyCjs7IHRvIGZvdXIgcGl4ZWxzIGZy b20gdGhlIGJvdHRvbS4KCihwcm9nbgogIChzZXRxIGZyYW1lLXJlc2l6ZS1waXhlbHdpc2UgdCkK ICAoc2V0LWZyYW1lLXBhcmFtZXRlciAoc2VsZWN0ZWQtZnJhbWUpICdmdWxsc2NyZWVuICdmdWxs aGVpZ2h0KSkKCgo7OyAtLS0tLS0tLS0tCjs7IFJlc3RhcnQgRW1jYXMKOzsKOzsgRXZhbHVhdGUg dGhlIGZvbGxvd2luZy4gVGhlIGZyYW1lIHNob3VsZCBzdHJldGNoIGZyb20gdGhlIHRvcCBvZgo7 OyB0aGUgc2NyZWVuIHRvIGZvdXIgcGl4ZWxzIGZyb20gdGhlIGJvdHRvbS4KCihwcm9nbgogIChz ZXRxIGZyYW1lLXJlc2l6ZS1waXhlbHdpc2UgdCkKICAoc2V0cSBucy1hdXRvLWhpZGUtbWVudS1i YXIgdCkKICAoc2V0LWZyYW1lLXBhcmFtZXRlciAoc2VsZWN0ZWQtZnJhbWUpICdmdWxsc2NyZWVu ICdmdWxsaGVpZ2h0KSkKCgo7OyAtLS0tLS0tLS0tCjs7IFJlc3RhcnQgRW1jYXMKOzsKOzsgRXZh bHVhdGUgdGhlIGZvbGxvd2luZyBhbmQgcHJlc3MgdGhlIGFsdC1jbGljayB0aGUgZ3JlZW4gYnV0 dG9uIChpdAo7OyBzaG91bGQgZGlzcGxheSBhIHBsdXMpLiBUaGUgZnJhbWUgc2hvdWxkIHN0cmV0 Y2ggZnJvbSB0aGUgbWVudSBiYXIKOzsgdG8gZm91ciBwaXhlbHMgZnJvbSB0aGUgYm90dG9tLgo7 Owo7OyBDbGljayBhZ2FpbiwgdGhlIGZyYW1lIHNob3VsZCBjb252ZXIgdGhlIGVudGlyZSBzY3Jl ZW4sIGV4Y2VwdCB0aGUKOzsgbWVudSBiYXIgYW5kIGZvdXIgcGl4ZWxzIGZyb20gdGhlIGJvdHRv bS4KOzsKOzsgQ2xpY2sgYWdhaW4sIHRoZSBmcmFtZSByZXR1cm4gdG8gaXRzIG9yaWdpbmFsIHNp emUgYW5kIHBsYWNlLgoKKHNldHEgZnJhbWUtcmVzaXplLXBpeGVsd2lzZSB0KQoKCjs7IC0tLS0t LS0tLS0KOzsgUmVzdGFydCBFbWNhcwo7Owo7OyBFdmFsdWF0ZSB0aGUgZm9sbG93aW5nIGFuZCBw cmVzcyB0aGUgYWx0LWNsaWNrIHRoZSBncmVlbiBidXR0b24gKGl0Cjs7IHNob3VsZCBkaXNwbGF5 IGEgcGx1cykuIFRoZSBmcmFtZSBzaG91bGQgc3RyZXRjaCBmcm9tIHRoZSB0b3AgdG8KOzsgZm91 ciBwaXhlbHMgZnJvbSB0aGUgYm90dG9tLgoKKHByb2duCiAgKHNldHEgZnJhbWUtcmVzaXplLXBp eGVsd2lzZSB0KQogIChzZXRxIG5zLWF1dG8taGlkZS1tZW51LWJhciB0KSkKCjs7IG5zLWZyYW1l LXRlc3QuZWwgZW5kcyBoZXJlLgo= --f403045e6976f1dabd054997102b-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 10:05:23 2017 Received: (at 25818) by debbugs.gnu.org; 28 Feb 2017 15:05:23 +0000 Received: from localhost ([127.0.0.1]:60386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cijL8-00010g-2t for submit@debbugs.gnu.org; Tue, 28 Feb 2017 10:05:23 -0500 Received: from sinyavsky.aurox.ch ([37.35.109.145]:53742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cijL5-00010T-RB for 25818@debbugs.gnu.org; Tue, 28 Feb 2017 10:05:20 -0500 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 92AD022380 for <25818@debbugs.gnu.org>; Tue, 28 Feb 2017 15:02:05 +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-type:content-type:mime-version:message-id:in-reply-to :date:date:references:subject:subject:to:from:from; s=dkim; t= 1488294123; x=1489158124; bh=VZEKh1IphMZ5yTYrSwOsWCxjS8A4XDRz9YK oGDG0UG0=; b=XGgtfIs0tx/zEeKQV1GABUW5wGByxHPxBy4Be3kMhY7SsW4R8eN lrHV9pKi/dxnFlNnN0g8SQDmC3rNg0HKSIvdJtHbt0TbkVAuYgkCJI1ompy6WeP9 84yV9Pqh05yMcZpyHgznq0vvrMyvTS04jtpumTGamOnPEx17+I0Kul5Y= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 g0_3SDMQEqhB for <25818@debbugs.gnu.org>; Tue, 28 Feb 2017 15:02:03 +0000 (UTC) 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 40CF022365; Tue, 28 Feb 2017 15:02:02 +0000 (UTC) From: charles@aurox.ch (Charles A. Roelli) To: Anders Lindgren Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> Date: Tue, 28 Feb 2017 16:05:09 +0100 In-Reply-To: (Anders Lindgren's message of "Tue, 28 Feb 2017 14:20:55 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25818 Cc: martin rudalics , YAMAMOTO Mitsuharu , 25818@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Thanks for the quick response. On Tue, Feb 28 2017 at 02:20:55 pm, Anders Lindgren wrote: > Hi! > > I'm the author behind the changes you are discussing. > > Emacs 24.3 demonstrates a number of problems when you want to stretch Emacs > across two screens and also when placing the title bar above the top of the > screen (which is very useful when `ns-auto-hide-menu-bar' is non-nil). > Applying the suggested patch would only reintroduce those problems. I've tested my patched version of Emacs master and I can stretch one frame across both screens (seemingly) without any problem. It is possible that my patched version would not do the right thing on OS X 10.9+, though, if the interaction with "Spaces" and constrainFrameRect is different there. [BTW, if I understand right, "Spaces" in Mac OS X 10.9+ prevent you from having any frame spanning multiple monitors. Does the current Emacs code (without my patch) remove that limitation?] Also, thank you for pointing out `ns-auto-hide-menu-bar'. I did not know about that variable. But I do not understand why you would want to place a frame above the top of the screen when the menu bar is hidden. It might give you an extra row of text, at the cost of obscuring the close/iconify/maximize buttons, and the frame title. You could get more bang for your buck by turning off `tool-bar-mode', IMO. And I don't think OS X natively allows a user to place a frame above the top of the screen anyway. > A better solution would be to add to code to check if the Emacs frame is > outside any monitor, and then (and only then) call the constrainFrameRect > method of the parent class. Your use case above for a frame (placing it above the top of the screen, as with `(set-frame-position (selected-frame) 0 -10)' in your test code), would (I think) count as bringing the frame outside of a screen, and therefore constrainFrameRect would kick in, bringing the frame back to ((top . 0) (left . 0)) -- as my patched version does. But this is apparently not what you want. So we would need to allow some leeway in the calculation to allow a frame to be only slightly outside of a monitor? This sounds complicated to me. > Also, if I remember correctly, 24.3 behaved differently when you had one > monitor compared to multiple monitors. I removed this, as I didn't see the > point of it, and because if introduced an extra level of complexity when it > came to testing. In my recently built emacs-24.3, I can't see any different behavior with a second monitor (except, of course, that `display-pixel-width' only accounts for the first monitor, which must ultimately have some consequences). > When it comes to `display-pixel-width', it should return the combined width > of side-by-side monitors, so 24.4 and newer Emacs versions behave correctly. > > I have attached a test file I used when I worked with the NS port. Thank you, it's a good start for testing out the frame handling code on different versions. > Anyway, I'm glad that you have looked into this. The number of people > actively working on the NS port are close to zero (I threw in the towel > about a year ago, simply because I couldn't find the time I needed to spend > on it). If you are interested in contributing, you can look at the > "NeXTstep port" section of the "TODO" file. Will do. Do you know of any good resources for tinkering in this area? I have some old Apple docsets available which I haven't really gotten around to reading yet, but that's about it. > > On Mon, Feb 27, 2017 at 9:47 PM, Charles A. Roelli wrote: > >> Bisecting between emacs-24.3 and emacs-24.4 led me to commit >> 680e6b8c5a28489733df544edb074fd29d0522a0, which introduces the >> regression. There is also a possibly related commit two hours later, >> 1269a680862a9bc6cd65e3d26ef05f68c7521632. >> >> Commit 680e6b8c introduces the behavior observed in 24.4, where a frame >> is not constrained to the screen area. Also interesting is that >> `display-pixel-width' works correctly (for multiple monitors as well, >> that is) in the commit and the commits immediately preceding it, so it >> may only be tangentially related. >> >> I'm attaching the changeset of 680e6b8c and CCing the author. >> >> I looked into constrainFrameRect, and it seems to have different >> behavior depending on whether "Spaces" are available (introduced in OS X >> 10.9 apparently). Might also have something to with the issue at hand. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 15:35:29 2017 Received: (at 25818) by debbugs.gnu.org; 28 Feb 2017 20:35:29 +0000 Received: from localhost ([127.0.0.1]:60598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cioUb-00045Y-0x for submit@debbugs.gnu.org; Tue, 28 Feb 2017 15:35:29 -0500 Received: from mail-ua0-f170.google.com ([209.85.217.170]:33288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cioUY-00045L-SS for 25818@debbugs.gnu.org; Tue, 28 Feb 2017 15:35:27 -0500 Received: by mail-ua0-f170.google.com with SMTP id x24so27165570uab.0 for <25818@debbugs.gnu.org>; Tue, 28 Feb 2017 12:35:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=u4mf07Ee00VgXkDPZfNO6mXWn+OwB2LRL1pxzmXLcmg=; b=otoPagZGPimjC8C1XgfA7/76Nryn9DLIFh7hOGPES0k2rHyPFhF2W/2tXkFevnEwkL 7Yqq+FCEwsQaM4kG5l2dOUujIMeQ6Z6Jl3sq68eXDpCySti2bTIyIfRvCnB9zJd0XzG4 ZzanH814F6mcaYQT6CUfQPRywLyTSCVSSge88EyOr7QZCUxTKyn7pVRvaNtDlyHIN63A 2S+cts+PnG9R/C6kM7a1UDhEAQjpvxF2Lo1XJKaVxedoPQCYz43cbLZOUPLSPfvq9LqH NzO+X9QZE8t6CG5PXLaoyZ2U+VDw/YslGUTQnoa/JBHdrFB61uWlbhpZVtxoMDP1nLZS BynA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=u4mf07Ee00VgXkDPZfNO6mXWn+OwB2LRL1pxzmXLcmg=; b=qkJYS/bTSGwBT9mRvsSlGPevM4/AmghYxi0+pwWmQ9kT6mGLUicvrVGBmld3E45s6r OvaCq4M6eRz7osGbodpXP147+o3vEmt7K9iwMZLX3OTpO5bkvekxV14d1zjQrROnDRna DUIOMTQkn9hFmFsGOmCvbLz31BhCdW+OrCGKmUQ+/yDygf6/pEj/+5ldBFuMpPB4k4cP bKy0HNhwqwj1PHy4xOXkXaIYEuXyfs+oE1P30yLVeap61wJIMP3UDeJUbRC85lZtIUVp brbsj/kIIan1+Gic19ohCdXsDceTqYWES3Cq5mp7zyFlhl5GYKTQqbMX348UTSCr6N0E X3VA== X-Gm-Message-State: AMke39nRq/k+di8+GrhQIbwBJQCL12B5BPAp35EAF8b10NlfP0nbFD8pWs7BglUsOuOt2f3eTiENuUkexjl0hg== X-Received: by 10.31.96.20 with SMTP id u20mr2009572vkb.53.1488314116199; Tue, 28 Feb 2017 12:35:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.242.15 with HTTP; Tue, 28 Feb 2017 12:35:15 -0800 (PST) In-Reply-To: References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> From: Anders Lindgren Date: Tue, 28 Feb 2017 21:35:15 +0100 Message-ID: Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: "Charles A. Roelli" Content-Type: multipart/alternative; boundary=001a114e61bc35dcda05499d2261 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25818 Cc: martin rudalics , YAMAMOTO Mitsuharu , 25818@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --001a114e61bc35dcda05499d2261 Content-Type: text/plain; charset=UTF-8 Hi! > I've tested my patched version of Emacs master and I can stretch one > frame across both screens (seemingly) without any problem. It is > possible that my patched version would not do the right thing on OS X > 10.9+, though, if the interaction with "Spaces" and constrainFrameRect > is different there. > > [BTW, if I understand right, "Spaces" in Mac OS X 10.9+ prevent you from > having any frame spanning multiple monitors. Does the current Emacs > code (without my patch) remove that limitation?] > In 10.9, a "space" is a dedicated full-frame area. I don't think your patch will affect this. It took quite a lot of work to get the current implementation to work for a variety of scenarios. To throw in a "quick fix" for another scenario will most likely break things that work today. It would be better to identify some situations when the function should behave differently and fix those specific cases. > A better solution would be to add to code to check if the Emacs frame is > > outside any monitor, and then (and only then) call the constrainFrameRect > > method of the parent class. > > Your use case above for a frame (placing it above the top of the screen, > as with `(set-frame-position (selected-frame) 0 -10)' in your test > code), would (I think) count as bringing the frame outside of a screen, > and therefore constrainFrameRect would kick in, bringing the frame back > to ((top . 0) (left . 0)) -- as my patched version does. But this is > apparently not what you want. So we would need to allow some leeway in > the calculation to allow a frame to be only slightly outside of a > monitor? This sounds complicated to me. > I think it is acceptable if a frame is partially outside the display. What I suggested was to check if the frame was ENTIRELY outside any monitor, and in that case call the parent function to bring it in. This test should be trivial to implement. You can find a lot of the recent design decisions of the NS port in the epic discussion thread of bug 21415. Also, thank you for pointing out `ns-auto-hide-menu-bar'. I did not > know about that variable. But I do not understand why you would want to > place a frame above the top of the screen when the menu bar is hidden. > It might give you an extra row of text, at the cost of obscuring the > close/iconify/maximize buttons, and the frame title. You could get more > bang for your buck by turning off `tool-bar-mode', IMO. And I don't > think OS X natively allows a user to place a frame above the top of the > screen anyway. > By placing the title bar above the top of the screen, I'm able to use the entire height of the monitor for text, while having access to the menu by moving the mouse pointer to the top of the screen. I don't need the buttons and the frame title is of little use. Admittedly, I'm a bit crazy when it comes to screen real estate -- with a small font, six side-by-side windows, and Follow mode enabled, I get 888 consecutive lines of text. > Anyway, I'm glad that you have looked into this. The number of people > > actively working on the NS port are close to zero (I threw in the towel > > about a year ago, simply because I couldn't find the time I needed to > spend > > on it). If you are interested in contributing, you can look at the > > "NeXTstep port" section of the "TODO" file. > > Will do. Do you know of any good resources for tinkering in this area? > I have some old Apple docsets available which I haven't really gotten > around to reading yet, but that's about it. I mostly look at the reference documentation like https://developer.apple.com/reference/appkit/nswindow There are tons of introductory text on macOS (which, internally, is similar for iOS). You have to look for one which suit your background knowledge. You can, however, skip anything related to the "Interface Builder", since it's not used by Emacs. If you don't know Objective-C, I would recommend you to start with an introduction to that, and go from there. -- Anders --001a114e61bc35dcda05499d2261 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!
=C2=A0
I'= ;ve tested my patched version of Emacs master and I can stretch one
frame across both screens (seemingly) without any problem.=C2=A0 It is
possible that my patched version would not do the right thing on OS X
10.9+, though, if the interaction with "Spaces" and constrainFram= eRect
is different there.

[BTW, if I understand right, "Spaces" in Mac OS X 10.9+ prevent y= ou from
having any frame spanning multiple monitors.=C2=A0 Does the current Emacs code (without my patch) remove that limitation?]

<= /div>
In 10.9, a "space" is a dedicated full-frame area. I do= n't think your patch will affect this.

It took= quite a lot of work to get the current implementation to work for a variet= y of scenarios. To throw in a "quick fix" for another scenario wi= ll most likely break things that work today. It would be better to identify= some situations when the function should behave differently and fix those = specific cases.


> A better solution would be to add to = code to check if the Emacs frame is
> outside any monitor, and then (= and only then) call the constrainFrameRect
> method of the parent cla= ss.

Your use case above for a frame (placing it above the top of the= screen,
as with `(set-frame-position (selected-frame) 0 -10)' in yo= ur test
code), would (I think) count as bringing the frame outside of a = screen,
and therefore constrainFrameRect would kick in, bringing the fra= me back
to ((top . 0) (left . 0)) -- as my patched version does.=C2=A0 B= ut this is
apparently not what you want.=C2=A0 So we would need to allow= some leeway in
the calculation to allow a frame to be only slightly out= side of a
monitor?=C2=A0 This sounds complicated to me.
=

I think it is acceptable if a frame is partially outsid= e the display. What I suggested was to check if the frame was ENTIRELY outs= ide any monitor, and in that case call the parent function to bring it in. = This test should be trivial to implement.

Yo= u can find a lot of the recent design decisions of the NS port in the epic = discussion thread of bug 21415.


Also, thank you for pointing out = `ns-auto-hide-menu-bar'.=C2=A0 I did not
know about that variable.=C2=A0 But I do not understand why you would want = to
place a frame above the top of the screen when the menu bar is hidden.
It might give you an extra row of text, at the cost of obscuring the
close/iconify/maximize buttons, and the frame title.=C2=A0 You could get mo= re
bang for your buck by turning off `tool-bar-mode', IMO.=C2=A0 And I don= 't
think OS X natively allows a user to place a frame above the top of the
screen anyway.

By placing the title bar= above the top of the screen, I'm able to use the entire height of the = monitor for text, while having access to the menu by moving the mouse point= er to the top of the screen. I don't need the buttons and the frame tit= le is of little use.

Admittedly, I'm a bit cra= zy when it comes to screen real estate -- with a small font, six side-by-si= de windows, and Follow mode enabled, I get 888 consecutive lines of text.


> Anyway, I'm glad that you have looked into this. = The number of people
> actively working on the NS port are close to zero (I threw in the towe= l
> about a year ago, simply because I couldn't find the time I needed= to spend
> on it). If you are interested in contributing, you can look at the
> "NeXTstep port" section of the "TODO" file.

Will do.=C2=A0 Do you know of any good resources for tinkering in th= is area?
I have some old Apple docsets available which I haven't really gotten around to reading yet, but that's about it.

=
I mostly look at the reference documentation like https://dev= eloper.apple.com/reference/appkit/nswindow

There are tons of introductory text on macOS (which, internally, is simil= ar for iOS). You have to look for one which suit your background knowledge.= You can, however, skip anything related to the "Interface Builder&quo= t;, since it's not used by Emacs. If you don't know Objective-C, I = would recommend you to start with an introduction to that, and go from ther= e.

=C2=A0 =C2=A0 -- Anders

--001a114e61bc35dcda05499d2261-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 17:05:45 2017 Received: (at 25818) by debbugs.gnu.org; 28 Feb 2017 22:05:45 +0000 Received: from localhost ([127.0.0.1]:60654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciptw-0001Tp-Uq for submit@debbugs.gnu.org; Tue, 28 Feb 2017 17:05:45 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:50781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciptv-0001TJ-KL for 25818@debbugs.gnu.org; Tue, 28 Feb 2017 17:05:44 -0500 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v1SM5Sii020726 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Feb 2017 22:05:29 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v1SM5Sbu005480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Feb 2017 22:05:28 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v1SM5S20023299; Tue, 28 Feb 2017 22:05:28 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 28 Feb 2017 14:05:26 -0800 (PST) From: Drew Adams To: Anders Lindgren , "Charles A. Roelli" Subject: RE: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Excuse me for chiming in without really following this thread. I don't use OS X, for one thing, and I'm not following this particular bug. But if one of the questions is whether an Emacs user (or code) should _be able_ to position a frame off screen then I emphatically say yes, s?he should. I have code that lets you incrementally move a frame up/down/left/right, including wraparound or including the possibility of not wrapping but continuing till the frame is entirely off screen. I don't see anything wrong with _allowing_ someone to position a frame off screen. Why they might want to do that is up to them. If that question is not in fact being raised in this bug discussion, then please ignore this intrusion, and sorry for the noise. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 05:48:31 2017 Received: (at 25818) by debbugs.gnu.org; 1 Mar 2017 10:48:32 +0000 Received: from localhost ([127.0.0.1]:32828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj1o7-0001ih-Kz for submit@debbugs.gnu.org; Wed, 01 Mar 2017 05:48:31 -0500 Received: from mail-ua0-f177.google.com ([209.85.217.177]:35507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj1o6-0001iT-Q0 for 25818@debbugs.gnu.org; Wed, 01 Mar 2017 05:48:31 -0500 Received: by mail-ua0-f177.google.com with SMTP id q7so7682933uaf.2 for <25818@debbugs.gnu.org>; Wed, 01 Mar 2017 02:48:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=rqDtoFsUWrDLZjnkr+JjcxjJWGdenFi4RR/RSbQ+Y3Y=; b=iS9OQJGrL0HfDq4RFq2+XF8us62SF+bN8/HJJ4Jr314hMO0DxpMa+XFpcpAGfmTDs8 RNp5BILaA+02Xo2Z828Xr3g3lHLWYbx4manYqLWLY8IUi662SVzD6jjO//e7UQy7a8Hk XO8VBn1IZriRP/ygnpk9tBDcVYfysx4sZGYubUmywgeuJZHThUys3gufzlzqPzHhQPMd CFtnhKYLHtGryT2zUEcj89UcrSu212KWM6T46LOiFTPCuGkpEAFp/czLlWOaZB7J2EP7 y2uS0DVUjuBBitaPslIlbDfn9IspzklPpmGmKN60GUx2a7eMe5InGxWaYFZIfapgU5Tw 8N6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=rqDtoFsUWrDLZjnkr+JjcxjJWGdenFi4RR/RSbQ+Y3Y=; b=syz22xg5vaFLdByFRf/2a+2ZQvBC/vffnv8aXTl6kK+zTrtxVPsgCPpLd17EGICFJC Gs2LUFYBFPWRQdAgC6BuM2ytJr9TMT4OIGLnyL3j35CdXWDggZ9v7m+xXYzgf3UL+8y1 X0+Ywuq/8l4n/ZYFgwOBa1kErnXUEAkySrE162q+TUXM4G+9sCtslMS9gBPQkO2fTo7e OTwvTVHoC9++3cX2XbqNGs7t1kmgBah0uysm/hSb2bab1gfeAQqtcJWlFDoveVUq49N/ 6G2Rorg8Iq1EWGjn3Hsk+IkgHl/lKyV9tpxnOfjPqp1b4dDfFN1ykna/nrwQCqYdDDjv muhg== X-Gm-Message-State: AMke39mQ86b4Hv+iDRIfyvTL+792IzDFizYrUdxEROLU7k9bPNH41T3uDAuYLtTq5JSrNK3DXklZNRMDnTisgg== X-Received: by 10.176.75.1 with SMTP id h1mr3144281uaf.145.1488365305179; Wed, 01 Mar 2017 02:48:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.242.15 with HTTP; Wed, 1 Mar 2017 02:48:24 -0800 (PST) In-Reply-To: References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> From: Anders Lindgren Date: Wed, 1 Mar 2017 11:48:24 +0100 Message-ID: Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: Drew Adams Content-Type: multipart/alternative; boundary=f403045e69764fb7bd0549a90d31 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, "Charles A. Roelli" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --f403045e69764fb7bd0549a90d31 Content-Type: text/plain; charset=UTF-8 Hi! On Tue, Feb 28, 2017 at 11:05 PM, Drew Adams wrote: > But if one of the questions is whether an Emacs user > (or code) should _be able_ to position a frame off > screen then I emphatically say yes, s?he should. > > I have code that lets you incrementally move a frame > up/down/left/right, including wraparound or including > the possibility of not wrapping but continuing till > the frame is entirely off screen. > > I don't see anything wrong with _allowing_ someone > to position a frame off screen. Why they might want > to do that is up to them. > I can see the point of your argument. After all, this is how Emacs work today, and most people have been fine with it. However, I don't feel 100% comfortable with the current situation. The main issue is people with laptops connected to an extern monitor. When the external monitor is disconnected, Emacs might land off screen. I would imagine that most people would prefer that Emacs would be moved and resized to fit in the screen of the laptop (as I imagine, most macOS application behave). Secondly, I miss an easy accessible method to move off-screen frames into the visible parts of the display. On macOS, the menu is always accessible even if the window isn't, so the obvious place would be a menu item like "Collect Frame" (I noticed that "C-x 5 c" is unbound) -- it could be placed after "Delete Frame" in the "File" menu. If that question is not in fact being raised in this > bug discussion, then please ignore this intrusion, > and sorry for the noise. > No need to apologize, your input is always welcome! -- Anders --f403045e69764fb7bd0549a90d31 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

On Tue, Feb 28, 2017 at 11:05 PM, Drew Adams <<= a href=3D"mailto:drew.adams@oracle.com" target=3D"_blank">drew.adams@oracle= .com> wrote:
But if one of = the questions is whether an Emacs user
(or code) should _be able_ to position a frame off
screen then I emphatically say yes, s?he should.

I have code that lets you incrementally move a frame
up/down/left/right, including wraparound or including
the possibility of not wrapping but continuing till
the frame is entirely off screen.

I don't see anything wrong with _allowing_ someone
to position a frame off screen.=C2=A0 Why they might want
to do that is up to them.

I can see the= point of your argument. After all, this is how Emacs work today, and most = people have been fine with it.

However, I don'= t feel 100% comfortable with the current situation.

The main issue is people with laptops connected to an extern monitor. Whe= n the external monitor is disconnected, Emacs might land off screen. I woul= d imagine that most people would prefer that Emacs would be moved and resiz= ed to fit in the screen of the laptop (as I imagine, most macOS application= behave).

Secondly, I miss an easy accessible meth= od to move off-screen frames into the visible parts of the display. On macO= S, the menu is always accessible even if the window isn't, so the obvio= us place would be a menu item like "Collect Frame" (I noticed tha= t "C-x 5 c" is unbound) -- it could be placed after "Delete = Frame" in the "File" menu.


If that question is not in fact being raised in this
bug discussion, then please ignore this intrusion,
and sorry for the noise.

No need to apo= logize, your input is always welcome!

=C2=A0 =C2= =A0 -- Anders

--f403045e69764fb7bd0549a90d31-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 11:10:49 2017 Received: (at 25818) by debbugs.gnu.org; 1 Mar 2017 16:10:49 +0000 Received: from localhost ([127.0.0.1]:34583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj6q0-0003OE-SE for submit@debbugs.gnu.org; Wed, 01 Mar 2017 11:10:49 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:41442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj6pz-0003O1-L6 for 25818@debbugs.gnu.org; Wed, 01 Mar 2017 11:10:48 -0500 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v21GAbZJ029875 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Mar 2017 16:10:38 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v21GAbDa031412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Mar 2017 16:10:37 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v21GAa85032222; Wed, 1 Mar 2017 16:10:37 GMT MIME-Version: 1.0 Message-ID: <87a50d91-a1c6-4079-a7f1-054131f05fc6@default> Date: Wed, 1 Mar 2017 08:10:35 -0800 (PST) From: Drew Adams To: Anders Lindgren Subject: RE: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0022.oracle.com [156.151.31.74] X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, "Charles A. Roelli" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) > I can see the point of your argument. After all, this is how Emacs > work today, and most people have been fine with it. >=20 > However, I don't feel 100% comfortable with the current situation. >=20 > The main issue is people with laptops connected to an extern monitor. > When the external monitor is disconnected, Emacs might land off screen. > I would imagine that most people would prefer that Emacs would be > moved and resized to fit in the screen of the laptop (as I imagine, > most macOS application behave). > Secondly, I miss an easy accessible method to move off-screen frames > into the visible parts of the display. On macOS, the menu is always > accessible even if the window isn't, so the obvious place would be > a menu item like "Collect Frame" (I noticed that "C-x 5 c" is unbound) > -- it could be placed after "Delete Frame" in the "File" menu. I think I agree with everything you wrote. Users & Emacs-Lisp code should be able to position a frame partially or fully off-screen. But users should have simple ways to bring a given frame or all frames that are completely off screen on screen. And I agree with Martin's observation that such things should be available from Emacs, but when a window mgr does something we don't want wrt positioning users (and Emacs code) should be able to try to compensate in some way (change the position to something that is acceptable by the window mgr). And our doc should make clear to users that Emacs doesn't get the last word, so that some behavior they see may be imposed by the window mgr, i.e., beyond Emacs's control. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 19 15:39:03 2017 Received: (at 25818) by debbugs.gnu.org; 19 Mar 2017 19:39:03 +0000 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 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 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 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) 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) From: charles@aurox.ch (Charles A. Roelli) To: Anders Lindgren Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> Date: Sun, 19 Mar 2017 20:38:50 +0100 In-Reply-To: (Anders Lindgren's message of "Tue, 28 Feb 2017 21:35:15 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, YAMAMOTO Mitsuharu , martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 27 14:22:09 2017 Received: (at 25818) by debbugs.gnu.org; 27 Mar 2017 18:22:10 +0000 Received: from localhost ([127.0.0.1]:47718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csZHN-0007g3-GL for submit@debbugs.gnu.org; Mon, 27 Mar 2017 14:22:09 -0400 Received: from mail-vk0-f46.google.com ([209.85.213.46]:35307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csZHL-0007fg-Ek for 25818@debbugs.gnu.org; Mon, 27 Mar 2017 14:22:07 -0400 Received: by mail-vk0-f46.google.com with SMTP id r69so61868637vke.2 for <25818@debbugs.gnu.org>; Mon, 27 Mar 2017 11:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oOh9KSS+Vz5dV0kBXo+kHmumCPMjz/8RJRlofDEvgfY=; b=QaDYdCvtgwM3idTtUGHo74agd+C7M4g2LioccPBkGTJr/9lLft+Cm8AD0Qly2yY/BF YBhzoHPTJ7MMVPAGTW/kDOin2SHn+4umfMoQfhX73aXQ1oFpE6XeNx+P2jS5ii8bZIGj ek/93HOaUcXEF9jEMSZG9FSxZW3sW3zrSqYBUX7wZ2xy+OPNxrVqigncav9ddVUEyZ8R N7DJrQesjwfDQgjd8uJH6oGlMA4wpsMQUnanWnx1BfQXke2w7Cy6k/7o2w5xAiPtXCvG AJrxIw+qVU56lBdTaY65mMvJbgkiOk5tto5K5Z4HMBjjdtyougWUcaSym9BYk+qBS/DS LqyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oOh9KSS+Vz5dV0kBXo+kHmumCPMjz/8RJRlofDEvgfY=; b=nmq6Ho/4QBavDl6c27qTztOafAu5icVtfjZ7xFtkZExbychXr1eDDsFgFjV/IihF+n 1chXe7G1SkL9S9BZkcP2ILQPj+YGHBUAj4uzmzprUdFP0glqcYhvV3XnBNxTWNdjzhRF HxfS5p1B6O0Lx0teOo9X/bwu3GaBjbhjL1sLrRt3bepPdxrmcyeXSPixDwK+w2cJpEn7 CWF9Rnyvb2ji4eSEpkEDMLe4On2iFUUsoX1mtANqCocSduQDhCA74eOpzP41jIRnuA1P U/PV6dSDHTAM4OU6cN+TNODEouAaa7EMC6UP0eF2qsSVvMQtbgNbnqPB+IYudwXTGnfg Ap1g== X-Gm-Message-State: AFeK/H1zzd8Frq3PC3KClMzjvm+6QUWpeRghXO46H3LmwEuqD28i0kSrdrG5BD08Xm3LqZahj27EbXBc2pD/rQ== X-Received: by 10.159.36.169 with SMTP id 38mr8555793uar.115.1490638921816; Mon, 27 Mar 2017 11:22:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.180.11 with HTTP; Mon, 27 Mar 2017 11:22:00 -0700 (PDT) In-Reply-To: References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> From: Anders Lindgren Date: Mon, 27 Mar 2017 20:22:00 +0200 Message-ID: Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: "Charles A. Roelli" Content-Type: multipart/alternative; boundary=001a113e3c7e6c63b9054bba6b33 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, YAMAMOTO Mitsuharu , martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --001a113e3c7e6c63b9054bba6b33 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! Sorry for not getting back to you immediately. Anyway, I did try your original patch. Unfortunately, the effect is as I anticipated. When the patch is applied, if a frame is placed slightly outside the display area, it will be moved back inside the borders. Effectively, this means that you can't place the title bar above the top of the display, which is possible (by design) with an unpatched Emacs. (By the way, this is possible in Emacs on Windows as well.) I use OS X 10.10.5 (Yosemite). I have "spaces" disabled, which allows an Emacs frame to be stretched across multiple monitors. To solve your problem, and to ensure that we don't break anything for my use case, we would need to call "[super constrainFrameRect:frameRect toScreen:screen];" only when the frame is determined to be fully outside any monitor. This is not rocket science -- just iterate over all monitors and check that the frame overlap at least one. Sincerely, Anders Lindgren On Sun, Mar 19, 2017 at 8:38 PM, Charles A. Roelli wrote= : > 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. > There 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 ha= ve > 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. > --001a113e3c7e6c63b9054bba6b33 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

Sorry for not getting back to you i= mmediately.

Anyway, I did try your original patch.= Unfortunately, the effect is as I anticipated. When the patch is applied, = if a frame is placed slightly outside the display area, it will be moved ba= ck inside the borders. Effectively, this means that you can't place the= title bar above the top of the display, which is possible (by design) with= an unpatched Emacs. (By the way, this is possible in Emacs on Windows as w= ell.)

I use OS X 10.10.5 (Yosemite). I have "= spaces" disabled, which allows an Emacs frame to be stretched across m= ultiple monitors.

To solve your problem, and to en= sure that we don't break anything for my use case, we would need to cal= l "[super constrainFrameRect:frameRec= t toScreen:screen];" only when the frame is determined to be fully out= side any monitor. This is not rocket science -- just iterate over all monit= ors and check that the frame overlap at least one.

Sincerely,
=C2=A0 =C2=A0 Anders Lindgren

On Sun, Mar 19, 2017 a= t 8:38 PM, Charles A. Roelli <charles@aurox.ch> wrote:
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.=C2=A0 Because from wh= at
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
=C2=A0 =C2=A0 `(set-frame-position (selected-frame) 0 10000)' (best don= e from
=C2=A0 =C2=A0 `emacs -Q').=C2=A0 If the moved frame cannot be returned = on-screen
=C2=A0 =C2=A0 programmatically, then you have the issue.=C2=A0 If it stays = on-screen,
=C2=A0 =C2=A0 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
-=C2=A0 // If separate spaces is on, it is like each screen is independent.= =C2=A0 There is
-=C2=A0 // no spanning of frames across screens.
-=C2=A0 if ([NSScreen screensHaveSeparateSpaces])
-=C2=A0 =C2=A0 {
-=C2=A0 =C2=A0 =C2=A0 NSTRACE_MSG ("Screens have separate spaces"= );
-=C2=A0 =C2=A0 =C2=A0 frameRect =3D [super constrainFrameRect:frameRect toS= creen:screen];
-=C2=A0 =C2=A0 =C2=A0 NSTRACE_RETURN_RECT (frameRect);
-=C2=A0 =C2=A0 =C2=A0 return frameRect;
-=C2=A0 =C2=A0 }
-#endif

According to the Apple documentation, screensHaveSeparateSpaces()
"returns a Boolean value that indicates whether each screen can have i= ts
own set of spaces.=C2=A0 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?=C2=A0 I assume then, that if you have "Spaces" tu= rned 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.=C2=A0 If it doesn't, then th= e fix
can be added only for OS X < 10.9.

--001a113e3c7e6c63b9054bba6b33-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 02 10:14:37 2017 Received: (at 25818) by debbugs.gnu.org; 2 Apr 2017 14:14:37 +0000 Received: from localhost ([127.0.0.1]:57589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cugH7-0001Ol-Iv for submit@debbugs.gnu.org; Sun, 02 Apr 2017 10:14:37 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:48615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cugH3-0001OV-UV for 25818@debbugs.gnu.org; Sun, 02 Apr 2017 10:14:34 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 61FC0223CE for <25818@debbugs.gnu.org>; Sun, 2 Apr 2017 14:10:49 +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-type:content-type:mime-version:message-id:in-reply-to :date:date:references:subject:subject:to:from:from; s=dkim; t= 1491142246; x=1492006247; bh=zlyIEoXGWRMJNk/i6feT0PKVTXtHOPPLNep vC6fQyqY=; b=eM0tv1NazdxBMgsQaAIfUM9NQkIxeC9rMZx2Dre1mmxPz5Hym27 +FayJ4afKmAQK2s0+bGAGuFo1g9CjzQrTnubJdZ96n9O8dCbEN2OYfezw4Z6j065 gyG8j/xAe0a+BDn0up1eOuIP1dC4skeFCI1XowogvKZZmaKQ346jOuRk= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 5eWcquiAiGAI for <25818@debbugs.gnu.org>; Sun, 2 Apr 2017 14:10:46 +0000 (UTC) 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 1E112223BD; Sun, 2 Apr 2017 14:10:45 +0000 (UTC) From: charles@aurox.ch (Charles A. Roelli) To: Anders Lindgren Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> Date: Sun, 02 Apr 2017 16:14:29 +0200 In-Reply-To: (Anders Lindgren's message of "Mon, 27 Mar 2017 20:22:00 +0200") Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, YAMAMOTO Mitsuharu , martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Hi Anders, Does the attached patch work for you? It's still a bit rough around the edges, but seems to do the right thing. A quick test on 10.6: (setq ns-auto-hide-menu-bar t) ;; Places the frame just above the top of the screen. (set-frame-position (selected-frame) 0 -20) ;; Frame would be completely offscreen; so it's constrained and brought ;; back. (set-frame-position (selected-frame) 0 -10000) Cheers, Charles --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Constrain-frames-to-visible-area-of-screens-in-OS-X.patch >From 60db513f5283525c3adacb29f1bc6ad4461a11b0 Mon Sep 17 00:00:00 2001 From: Charles A. Roelli Date: Sun, 2 Apr 2017 15:51:24 +0200 Subject: [PATCH] Constrain frames to visible area of screens in OS X * nsterm.m (constrainFrameRect:toScreen:): Constrain frames in OS X, if they would otherwise go offscreen. Fixes: debbugs:25818 --- src/nsterm.m | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index ebe29e4..b87b9fa 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7846,21 +7846,52 @@ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 // If separate spaces is on, it is like each screen is independent. There is // no spanning of frames across screens. if ([NSScreen screensHaveSeparateSpaces]) { NSTRACE_MSG ("Screens have separate spaces"); frameRect = [super constrainFrameRect:frameRect toScreen:screen]; NSTRACE_RETURN_RECT (frameRect); return frameRect; } -#endif + else +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 */ + { + NSArray *screens = [NSScreen screens]; + NSUInteger nr_screens = [screens count]; + + int i; + // A rectangle covering all the screen the frame is displayed in. + // Duplicated from constrain_frame_rect. + NSRect multiscreenRect = NSMakeRect(0, 0, 0, 0); + for (i = 0; i < nr_screens; ++i ) + { + NSScreen *s = [screens objectAtIndex: i]; + NSRect scrRect = [s frame]; + + NSTRACE_MSG ("Screen %d: " NSTRACE_FMT_RECT, + i, NSTRACE_ARG_RECT (scrRect)); + + multiscreenRect = NSUnionRect (multiscreenRect, scrRect); + } + + // Check that the proposed frameRect intersects the + // multiscreenRect. If it does not, constrain the frame and + // return it. See bug #25818. + if (!NSIntersectsRect(multiscreenRect, frameRect)) + { + NSTRACE_MSG ("Frame outside screens; constraining"); + frameRect = [super constrainFrameRect:frameRect toScreen:screen]; + NSTRACE_RETURN_RECT (frameRect); + return frameRect; + } + } #endif return constrain_frame_rect(frameRect, [(EmacsView *)[self delegate] isFullscreen]); } - (void)performZoom:(id)sender { NSTRACE ("[EmacsWindow performZoom:]"); -- 1.7.4.4 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 03 04:33:14 2017 Received: (at 25818) by debbugs.gnu.org; 3 Apr 2017 08:33:14 +0000 Received: from localhost ([127.0.0.1]:58089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuxQH-0007ct-Np for submit@debbugs.gnu.org; Mon, 03 Apr 2017 04:33:13 -0400 Received: from mail-vk0-f47.google.com ([209.85.213.47]:33786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cuxQF-0007cf-5S for 25818@debbugs.gnu.org; Mon, 03 Apr 2017 04:33:11 -0400 Received: by mail-vk0-f47.google.com with SMTP id d188so129293423vka.0 for <25818@debbugs.gnu.org>; Mon, 03 Apr 2017 01:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5cOGtrU8Ea0QVbKF6JJYj46g6woxZQzw0E8UVqLw4e0=; b=n+b/8aDwr1W/dQsIyBsdOo2EMXWKYF7l+miZC6yuteG9zYrPwGUO3fXFoLcAl5U4Nd A8tNEARhYOCmnCbvX5AFz18Tetc/Oum30s2JS1lCJqQvIeEzdBi1yvyNyJE9SGa3ohle JnRMurHcbYL90GRH9XGHzR6+3W0T/VapI9jDK1m/dAgAyQjghHuBq2cTiTViAMLObSOW DZCF2dny2SUqujDOMGgxC7fg2HTGGnqrb9yrR2vUPdKvudA+jC+pOR/Y3cUINiLITXcY ZWDhwSftmf8kIE8cggAZ+583waVYYYaaTlsWPM2E0O5apWwtmS1MC/+sFWRSGKiuBcjM pn9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5cOGtrU8Ea0QVbKF6JJYj46g6woxZQzw0E8UVqLw4e0=; b=GPx7WujnNl22aV25fw59/KIbjzm9MO0VHcRch1du2ewtQisEONPweJv3gFbBbpZbHP tmSRRecwEsuKSVLY2iHplrSW7o56ZGp0H0FV68ecjtodMVr+fx09hZa5S5pvJeSFRO4+ qPRf8M7ZuqINJbW6Wj668smEZoHmNkZ80ZjeaRNqBJIzBBIZk3H/NcPeadGZuBTSt6kI /ZdS61hf07gjgkzqwnJEmjau0EMy8eBH6uTb8HL3yXIsDwcNYn6seJm1p7CUE6sgSVJ0 ZuEraH/xAzqalfpXW0DdK9pz18umBE2TmUeeD4hln0I8rD6fNDM6g62PGb70rngN1p/Z e54Q== X-Gm-Message-State: AFeK/H2lnfHmINf1QqeVEG1Bn1cZq9SsH7PuKLxS5o0Y10bJVJUoBQfUtGqF8ZHmtMJpn8DPUpzKsI59jlKq4Q== X-Received: by 10.31.150.14 with SMTP id y14mr6985361vkd.18.1491208385178; Mon, 03 Apr 2017 01:33:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.165.71 with HTTP; Mon, 3 Apr 2017 01:33:04 -0700 (PDT) In-Reply-To: References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> From: Anders Lindgren Date: Mon, 3 Apr 2017 10:33:04 +0200 Message-ID: Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: "Charles A. Roelli" Content-Type: multipart/alternative; boundary=001a11425a8015b6c7054c3f02ff X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --001a11425a8015b6c7054c3f02ff Content-Type: text/plain; charset=UTF-8 Hi! I think this is a good start. However, there is a case that your patch miss. If you have multiple monitors arranged in, say, an L-shape, a frame might be placed inside "multiscreenRect", without actually being visible on any screen. (This typically occur when you have a large desktop monitor connected to a laptop or when you have one monitor placed horizontally and one vertically.) Fortunately, it should be easy to fix. What about something like (in pseudo-code): BOOL in_any_screen = NO; for (screen = /* Loop over all screens */ ...) { if (overlapping(frame, scree)) { in_any_screen = YES; break; } } if ( ! in_any_screen ) { /* Move the frame in */ } Anyway, I think that we're on the right track and I appreciate that you have taken time to work on this! -- Anders PS. I just found another, unrelated, problem, when comparing the NS and X11 versions. When passing a negative value to `set-frame-position' it is supposed to place the frame relative to the right/bottom border of the display, but in the NS version it doesn't. (The X11 version gets the Y placement wrong with 48 pixels, but that is another story.) On Sun, Apr 2, 2017 at 4:14 PM, Charles A. Roelli wrote: > Hi Anders, > > Does the attached patch work for you? It's still a bit rough around the > edges, but seems to do the right thing. > > A quick test on 10.6: > > (setq ns-auto-hide-menu-bar t) > > ;; Places the frame just above the top of the screen. > (set-frame-position (selected-frame) 0 -20) > > ;; Frame would be completely offscreen; so it's constrained and brought > ;; back. > (set-frame-position (selected-frame) 0 -10000) > > Cheers, > Charles > > --001a11425a8015b6c7054c3f02ff Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

I think this is a good start. Howev= er, there is a case that your patch miss. If you have multiple monitors arr= anged in, say, an L-shape, a frame might be placed inside "multiscreen= Rect", without actually being visible on any screen. (This typically o= ccur when you have a large desktop monitor connected to a laptop or when yo= u have one monitor placed horizontally and one vertically.)

<= /div>
Fortunately, it should be easy to fix. What about something like = (in pseudo-code):

=C2=A0 =C2=A0 =C2=A0BOOL in_any_= screen =3D NO;
=C2=A0 =C2=A0 =C2=A0for (screen =3D /* Loop over a= ll screens */ ...)
=C2=A0 =C2=A0 =C2=A0 =C2=A0{
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0if (overlapping(frame, scree))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 in_any_screen =3D YES;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2= =A0 =C2=A0if ( ! in_any_screen )
=C2=A0 =C2=A0 =C2=A0 =C2=A0{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* Move the frame in */
= =C2=A0 =C2=A0 =C2=A0 =C2=A0}

Anyway, I think that = we're on the right track and I appreciate that you have taken time to w= ork on this!

=C2=A0 =C2=A0 -- Anders

PS. I just found another, unrelated, problem, when comparin= g the NS and X11 versions. When passing a negative value to `set-frame-posi= tion' it is supposed to place the frame relative to the right/bottom bo= rder of the display, but in the NS version it doesn't. (The X11 version= gets the Y placement wrong with 48 pixels, but that is another story.)
=

On Su= n, Apr 2, 2017 at 4:14 PM, Charles A. Roelli <charles@aurox.ch> wrote:
Hi Anders,

Does the attached patch work for you?=C2=A0 It's still a bit rough arou= nd the
edges, but seems to do the right thing.

A quick test on 10.6:

(setq ns-auto-hide-menu-bar t)

;; Places the frame just above the top of the screen.
(set-frame-position (selected-frame) 0 -20)

;; Frame would be completely offscreen; so it's constrained and brought=
;; back.
(set-frame-position (selected-frame) 0 -10000)

Cheers,
Charles


--001a11425a8015b6c7054c3f02ff-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 08 16:40:43 2017 Received: (at 25818) by debbugs.gnu.org; 8 Apr 2017 20:40:43 +0000 Received: from localhost ([127.0.0.1]:38516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwxA3-0002v5-4z for submit@debbugs.gnu.org; Sat, 08 Apr 2017 16:40:43 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:51708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwxA1-0002uq-RI for 25818@debbugs.gnu.org; Sat, 08 Apr 2017 16:40:42 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id CD7DC223D9 for <25818@debbugs.gnu.org>; Sat, 8 Apr 2017 20:36:51 +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-type:content-type:mime-version:message-id:in-reply-to :date:date:references:subject:subject:to:from:from; s=dkim; t= 1491683808; x=1492547809; bh=V3N7VriCKGVFwcAhB+d3W09vNmKOuDso+ID lG23Q4Ic=; b=avNJfhDgjOpLnB29GB1TO2qbqFZXdNnerqihEhEmoqoolbwmwr1 wEkxKjfBmpCEYnBlAMXREeHo/sDjy3Me9O94yiQ+o9mb310SSc76/Ies2AgZcFTD XQ8RVnk695er+SkFMGhgNe/UNfFN27viAVBZUkyQpXnSkbXtOKRmRajY= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 yrTmPCOhuoSq for <25818@debbugs.gnu.org>; Sat, 8 Apr 2017 20:36:48 +0000 (UTC) Received: from gray (237.73.127.176.dynamic.wline.res.cust.swisscom.ch [176.127.73.237]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id A6A462238D; Sat, 8 Apr 2017 20:36:48 +0000 (UTC) From: charles@aurox.ch (Charles A. Roelli) To: Anders Lindgren Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> Date: Sat, 08 Apr 2017 22:40:31 +0200 In-Reply-To: (Anders Lindgren's message of "Mon, 3 Apr 2017 10:33:04 +0200") Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Hi Anders, Following your idea, here's an updated patch that works equivalently. Please let me know what you think. > Anyway, I think that we're on the right track and I appreciate that you > have taken time to work on this! My pleasure! > PS. I just found another, unrelated, problem, when comparing the NS and X11 > versions. When passing a negative value to `set-frame-position' it is > supposed to place the frame relative to the right/bottom border of the > display, but in the NS version it doesn't. (The X11 version gets the Y > placement wrong with 48 pixels, but that is another story.) Hm... but what if a second display is in the negative coordinate space? How would you place a frame on it programmatically? In any case I'll try to build the X11 version and see how it does it -- I wasn't aware that it still works on Mac OS. Cheers, Charles >> A quick test on 10.6: >> >> (setq ns-auto-hide-menu-bar t) >> >> ;; Places the frame just above the top of the screen. >> (set-frame-position (selected-frame) 0 -20) >> >> ;; Frame would be completely offscreen; so it's constrained and brought >> ;; back. >> (set-frame-position (selected-frame) 0 -10000) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Constrain-frames-to-visible-area-of-screens-in-OS-X-revised.patch >From 2b95b86f8c50665bbbb62b5faae0d8d610019594 Mon Sep 17 00:00:00 2001 From: Charles A. Roelli Date: Sat, 8 Apr 2017 22:15:17 +0200 Subject: [PATCH] Constrain frames to visible area of screens in OS X * nsterm.m (constrainFrameRect:toScreen:): Constrain frames in OS X, if they would otherwise go offscreen. Fixes: debbugs:25818 --- src/nsterm.m | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index ebe29e4..b1429f4 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7846,21 +7846,52 @@ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 // If separate spaces is on, it is like each screen is independent. There is // no spanning of frames across screens. if ([NSScreen screensHaveSeparateSpaces]) { NSTRACE_MSG ("Screens have separate spaces"); frameRect = [super constrainFrameRect:frameRect toScreen:screen]; NSTRACE_RETURN_RECT (frameRect); return frameRect; } -#endif + else +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 */ + // Check that the proposed frameRect intersects at least one + // screen rectangle. If it does not, constrain the frame and + // return it. See bug #25818. + { + NSArray *screens = [NSScreen screens]; + NSUInteger nr_screens = [screens count]; + + int i; + BOOL frame_on_screen = NO; + + for (i = 0; i < nr_screens; ++i) + { + NSScreen *s = [screens objectAtIndex: i]; + NSRect scrRect = [s frame]; + + if (NSIntersectsRect(frameRect, scrRect)) + { + frame_on_screen = YES; + break; + } + } + + if (!frame_on_screen) + { + NSTRACE_MSG ("Frame outside screens; constraining"); + frameRect = [super constrainFrameRect:frameRect toScreen:screen]; + NSTRACE_RETURN_RECT (frameRect); + return frameRect; + } + } #endif return constrain_frame_rect(frameRect, [(EmacsView *)[self delegate] isFullscreen]); } - (void)performZoom:(id)sender { NSTRACE ("[EmacsWindow performZoom:]"); -- 1.7.4.4 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 09 15:13:17 2017 Received: (at 25818) by debbugs.gnu.org; 9 Apr 2017 19:13:18 +0000 Received: from localhost ([127.0.0.1]:40078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxIGz-0004zK-Jd for submit@debbugs.gnu.org; Sun, 09 Apr 2017 15:13:17 -0400 Received: from mail-ua0-f177.google.com ([209.85.217.177]:35752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxIGw-0004z6-KN for 25818@debbugs.gnu.org; Sun, 09 Apr 2017 15:13:16 -0400 Received: by mail-ua0-f177.google.com with SMTP id 49so18264738uau.2 for <25818@debbugs.gnu.org>; Sun, 09 Apr 2017 12:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QJLYYKP0dbpvDpjjuPD2ZfS9igLoWVNjPB9SbMu0Emk=; b=mf5g42mJzMz8yzwmc1bhOqobAg1M5e19eNF9wLntcJ7eHpaulvz/SR1ZdzU3tYVzNl xkQ04YY74WrGmvuGZhsPBy/4a8nNdhv7yC0Kt0IYvxCAWVXBy/I3oG0AKp8z1slGYnEk MXs780RxbtY0zfvuL9zQK3Wn38170UUIlVAYDCxV8mi2PsQg+H7Ue2ZedEgR0xi1HW7V PpR9dBNbBVgq/PKFHAeW2I42HBCxHtNm10Cz4GRZxUuNGX69dMCECIzZq2MRCpLCZi+m t55eAXHonVTFAv0Ccg0GBU1mgQE5nYU6KYh52WMTbVLcLsuDdI9bs/c1inbBAvuEvUCP iMNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QJLYYKP0dbpvDpjjuPD2ZfS9igLoWVNjPB9SbMu0Emk=; b=ZWIfoPNQ2gdmG587hx2HQk+nd45BAh51GXW5e9m3baySuDkag1/CIyZzEQ3A7mh5pI gfHgTv2bpLHguv2v+5yNnGw/s+f9s+o8NQEx2EaJGWvoB+yUesKLqFbJB6k3r2PskxCE Gph2r6oZPvV34sYU6kLjfUZkQQVtPtGLn2vz9mweARh0o8tvlci1adaJe3Sb8xwBOhAS swHpFeU+IHsjsK4bKSH7y7fgG92TNDqa7w1/63xVv4xYYMZi2ks077hNabc5vDIY2w3+ 3ffiYMBszduhITfZ6tRXMuwyO/3HXnd5hcxaeHN++ApdugErk/SFRQ1eNm6imlCcL+jo dZDg== X-Gm-Message-State: AFeK/H0I+Hn3gsgVdsGkCDtujFHr1iI328woEOMlEKfdKfhChD5wFGZzOnu7rOJHPJLafVVvzBLbJNrYgeBjbA== X-Received: by 10.176.92.36 with SMTP id q36mr22866511uaf.93.1491765188935; Sun, 09 Apr 2017 12:13:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.165.71 with HTTP; Sun, 9 Apr 2017 12:13:08 -0700 (PDT) In-Reply-To: References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> From: Anders Lindgren Date: Sun, 9 Apr 2017 21:13:08 +0200 Message-ID: Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: "Charles A. Roelli" Content-Type: multipart/alternative; boundary=f403043621d62cc6f7054cc0a6e2 X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --f403043621d62cc6f7054cc0a6e2 Content-Type: text/plain; charset=UTF-8 Hi! > Following your idea, here's an updated patch that works equivalently. > Please let me know what you think. > It looks really good! I've applied it and it works for my use case (placing the menu bar above the top of the screen) and also for your (the frame isn't visible at all). Also, I'm sure it will work with L-shaped layouts as well, even though I haven't tried it. I've got two minor comments. And when I say "minor" they really are minor, feel free to disregard them if you like: * The nsterm.m file is (almost) tab free, so I would appreciate if you would untabify the code. * Replace the comment with something like the following: // Check that the proposed frame placement is visible in at least // one screen. If it is not, ask the system to reposition it. If someone doesn't understand what the code does and why, the original comment doesn't help as it only repeats the algorithm of the code. Also, I don't see the need to refer to a bug number in the comment, except under very special circumstances -- that information is available in the git commit message. > PS. I just found another, unrelated, problem, when comparing the NS and > X11 > > versions. When passing a negative value to `set-frame-position' it is > > supposed to place the frame relative to the right/bottom border of the > > display, but in the NS version it doesn't. (The X11 version gets the Y > > placement wrong with 48 pixels, but that is another story.) > > Hm... but what if a second display is in the negative coordinate space? > How would you place a frame on it programmatically? You can set the `left' and `top' frame parameters. If they are assigned an integer they act like `set-frame-position' is supposed to work. However, if they are assigned `(+ INTEGER)' or `(- INTEGER)' the value is specified relative to the left (top) or right (bottom) edge of the display, respectively. This allows a frame to be placed anywhere. In any case I'll > try to build the X11 version and see how it does it -- I wasn't aware > that it still works on Mac OS. > It does. I've been using it as "the" reference implementation, whenever the documentation isn't 100% clear. -- Anders Cheers, > Charles > > >> A quick test on 10.6: > >> > >> (setq ns-auto-hide-menu-bar t) > >> > >> ;; Places the frame just above the top of the screen. > >> (set-frame-position (selected-frame) 0 -20) > >> > >> ;; Frame would be completely offscreen; so it's constrained and brought > >> ;; back. > >> (set-frame-position (selected-frame) 0 -10000) > > --f403043621d62cc6f7054cc0a6e2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!
=C2=A0
> PS. I just found another, unrelated, problem, when comparing the NS an= d X11
> versions. When passing a negative value to `set-frame-position' it= is
> supposed to place the frame relative to the right/bottom border of the=
> display, but in the NS version it doesn't. (The X11 version gets t= he Y
> placement wrong with 48 pixels, but that is another story.)

Hm... but what if a second display is in the negative coordinate spa= ce?
How would you place a frame on it programmatically?

You can set the `left' and `top' frame parameters. If they= are assigned an integer they act like `set-frame-position' is supposed= to work. However, if they are assigned `(+ INTEGER)' or `(- INTEGER)&#= 39; the value is specified relative to the left (top) or right (bottom) edg= e of the display, respectively. This allows a frame to be placed anywhere.<= /div>


In any case I'll
try to build the X11 version and see how it does it -- I wasn't aware that it still works on Mac OS.

It does.= I've been using it as "the" reference implementation, whenev= er the documentation isn't 100% clear.

=C2=A0 = =C2=A0 -- Anders

Cheers,
Charles

>> A quick test on 10.6:
>>
>> (setq ns-auto-hide-menu-bar t)
>>
>> ;; Places the frame just above the top of the screen.
>> (set-frame-position (selected-frame) 0 -20)
>>
>> ;; Frame would be completely offscreen; so it's constrained an= d brought
>> ;; back.
>> (set-frame-position (selected-frame) 0 -10000)


--f403043621d62cc6f7054cc0a6e2-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 10 15:55:04 2017 Received: (at 25818) by debbugs.gnu.org; 10 Apr 2017 19:55:04 +0000 Received: from localhost ([127.0.0.1]:41560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxfOx-0000xa-QW for submit@debbugs.gnu.org; Mon, 10 Apr 2017 15:55:04 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:52819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxfOv-0000wz-C9 for 25818@debbugs.gnu.org; Mon, 10 Apr 2017 15:55:02 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id D1DBA223E3 for <25818@debbugs.gnu.org>; Mon, 10 Apr 2017 19:51:07 +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-type:content-type:mime-version:message-id:in-reply-to :date:date:references:subject:subject:to:from:from; s=dkim; t= 1491853866; x=1492717867; bh=YtJmfqM9eUU+icgd3nnbSFt45FjplEpgRg1 +RnCK8kY=; b=ReNWuWMjC/Y6mRk00sdYk/Tv3GQ2DLChSDxGeKxJnbODqhY2F+e skc5UsBQ9VxrLhDrHeTBrChG+uhteD9g5bTED5SKun8e3wY2PM4LMf13D0BVQbSq emWjKRIV0w19Sgh+tSd5FwkZeqjz+HgwI2cvk1IrR9+6E++lSDgTyEVc= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 LPLl5Qa9M8Jr for <25818@debbugs.gnu.org>; Mon, 10 Apr 2017 19:51:06 +0000 (UTC) Received: from gray (237.73.127.176.dynamic.wline.res.cust.swisscom.ch [176.127.73.237]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 85D452238D; Mon, 10 Apr 2017 19:51:03 +0000 (UTC) From: charles@aurox.ch (Charles A. Roelli) To: Anders Lindgren Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> Date: Mon, 10 Apr 2017 21:54:48 +0200 In-Reply-To: (Anders Lindgren's message of "Sun, 9 Apr 2017 21:13:08 +0200") Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Hi Anders, > Also, I'm sure it will work with L-shaped layouts as well, > even though I haven't tried it. I gave it a try and it worked as expected. > I've got two minor comments. And when I say "minor" they really are minor, > feel free to disregard them if you like: > > * The nsterm.m file is (almost) tab free, so I would appreciate if you > would untabify the code. > > * Replace the comment with something like the following: > > // Check that the proposed frame placement is visible in at least > // one screen. If it is not, ask the system to reposition it. > > If someone doesn't understand what the code does and why, the original > comment doesn't help as it only repeats the algorithm of the code. Also, I > don't see the need to refer to a bug number in the comment, except under > very special circumstances -- that information is available in the git > commit message. Good points, I've made these fixes in the attached patch. >> Hm... but what if a second display is in the negative coordinate space? >> How would you place a frame on it programmatically? > > You can set the `left' and `top' frame parameters. If they are assigned an > integer they act like `set-frame-position' is supposed to work. However, if > they are assigned `(+ INTEGER)' or `(- INTEGER)' the value is specified > relative to the left (top) or right (bottom) edge of the display, > respectively. This allows a frame to be placed anywhere. I see now, thanks for this explanation. I tried building Emacs with X (--with-x --with-ns=no) and the configuring step picked up my installed version of GTK3, then later failed at the linking stage for temacs due to some GDK-related symbols not being present. Have you seen similar errors? Cheers, Charles --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Constrain-frames-to-visible-area-of-screens-in-OS-X-v2.patch >From a32609425f3aba89e1171e2dd1139876cc84051b Mon Sep 17 00:00:00 2001 From: Charles A. Roelli Date: Sat, 8 Apr 2017 22:15:17 +0200 Subject: [PATCH] Constrain frames to visible area of screens in OS X * nsterm.m (constrainFrameRect:toScreen:): Constrain frames in OS X, if they would otherwise go offscreen. Fixes: debbugs:25818 --- src/nsterm.m | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index ebe29e4..66c9d50 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7853,7 +7853,37 @@ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen NSTRACE_RETURN_RECT (frameRect); return frameRect; } -#endif + else +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 */ + // Check that the proposed frameRect is visible in at least one + // screen. If it is not, ask the system to reposition it. + { + NSArray *screens = [NSScreen screens]; + NSUInteger nr_screens = [screens count]; + + int i; + BOOL frame_on_screen = NO; + + for (i = 0; i < nr_screens; ++i) + { + NSScreen *s = [screens objectAtIndex: i]; + NSRect scrRect = [s frame]; + + if (NSIntersectsRect(frameRect, scrRect)) + { + frame_on_screen = YES; + break; + } + } + + if (!frame_on_screen) + { + NSTRACE_MSG ("Frame outside screens; constraining"); + frameRect = [super constrainFrameRect:frameRect toScreen:screen]; + NSTRACE_RETURN_RECT (frameRect); + return frameRect; + } + } #endif return constrain_frame_rect(frameRect, -- 1.7.4.4 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 11 14:35:40 2017 Received: (at 25818) by debbugs.gnu.org; 11 Apr 2017 18:35:40 +0000 Received: from localhost ([127.0.0.1]:43283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cy0dg-0000GU-8i for submit@debbugs.gnu.org; Tue, 11 Apr 2017 14:35:40 -0400 Received: from mail-ua0-f181.google.com ([209.85.217.181]:33544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cy0df-0000GE-8q for 25818@debbugs.gnu.org; Tue, 11 Apr 2017 14:35:39 -0400 Received: by mail-ua0-f181.google.com with SMTP id q26so3609530uaa.0 for <25818@debbugs.gnu.org>; Tue, 11 Apr 2017 11:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Nd5czYKHR7iMy+vEALkkJnaj/xOy/8TKlKRL8fEZOOM=; b=Xlq5/ABbLYTob70WWYlDCsGCNdgLDf4jM3EtofYU0QTIomz8g8AIK/RRtX0NDfmeAk +AG/LkyvPZztg6ZKZC7nI2/uqddNDIYpZP+TlAwIWLwH7vLJAgU+vUxgCbj8HuSxQ01Q RjDKa7TQfI246naisckip+nys6Q1FgYKzaMVP1qEqiT0iCK9yaCA1ECdMYgI0O9okkpD /FX5ZGDRnJuRwG4BBUECrxftX+ZdeMHY2J5P3RNFfOMvntak5KP8P+KFPb/wsCPOoT38 xk9fonQ5VEeyzqS44XDuxBtMEtN7oydbYXqHeVle9PdGesgnVVWTSaZ5LgOO4B47dmM7 +x8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Nd5czYKHR7iMy+vEALkkJnaj/xOy/8TKlKRL8fEZOOM=; b=X54uA8SvrxiH+wdQ4G2TSz3PRTCr/IwzXbyzizWd/JpXEnv9/4yUdo0wLqzTpw2q7e 13umkEKNS8xlHkw9zK8Fuv8WgX8JtoGfBrOOeX1nXU5leLJazAkFW5nBGaKFDJW0wJhq 5UewO8q0KQt8KP+JEMSpq9dFoj51oXzaQbMPlAqcwx64vKqmNPQLXZBDmGoBdJHrZMvS pri1ciULKRvT8XedzSn1nc55AWnXjRfNiP0jAVQzWII/anGXxEbh8JiP6o/yBuN7Xs3x pK53UwL90EU5VTuhPFA4vB4XGyZcydVQz03YXsfAm1TvW6A8PumqWx6sydUZZDBvCunV pIsQ== X-Gm-Message-State: AN3rC/5SBX6slzeZBRVDOwKtASRoRU7ovWUUe5TfdQqLjLneFutbJN97+Y5pc1HU7G1U0h0LiHhJAwOK6pZy5g== X-Received: by 10.176.65.3 with SMTP id j3mr2480720uad.93.1491935733475; Tue, 11 Apr 2017 11:35:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.165.71 with HTTP; Tue, 11 Apr 2017 11:35:32 -0700 (PDT) In-Reply-To: References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> From: Anders Lindgren Date: Tue, 11 Apr 2017 20:35:32 +0200 Message-ID: Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: "Charles A. Roelli" Content-Type: multipart/alternative; boundary=94eb2c1242ce6c0113054ce85b7c X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) --94eb2c1242ce6c0113054ce85b7c Content-Type: text/plain; charset=UTF-8 Hi! On Mon, Apr 10, 2017 at 9:54 PM, Charles A. Roelli wrote: > Good points, I've made these fixes in the attached patch. > Looks good! Have you assigned copyright to FSF? Have you commit rights to the Emacs archive? If not, would you like me to commit it for you? I tried building Emacs with X > (--with-x --with-ns=no) and the configuring step picked up my installed > version of GTK3, then later failed at the linking stage for temacs due > to some GDK-related symbols not being present. Have you seen similar > errors? > I haven't got GTK3 libraries installed. I've used the following command line to configure: ./configure --with-x --with-ns=no --without-dbus --with-jpeg=no --with-gif=no --with-tiff=no --x-includes=/Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/:/Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/freetype2 -- Anders --94eb2c1242ce6c0113054ce85b7c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

On Mon, Apr 10, 2017 at 9:54 PM, Charles A. Roelli <charles@aurox.ch= > wrote:
Good points, I've made these fixes in the attached patch.

Looks good!

Have you assig= ned copyright to FSF?

Have you commit rights to th= e Emacs archive? If not, would you like me to commit it for you?
=

= I tried building Emacs with X
(--with-x --with-ns=3Dno) and the configuring step picked up my installed version of GTK3, then later failed at the linking stage for temacs due
to some GDK-related symbols not being present.=C2=A0 Have you seen similar<= br> errors?

I haven't got G= TK3 libraries installed. I've used the following command line to config= ure:

.= /configure --with-x --with-ns=3Dno --without-dbus --with-jpeg=3Dno --with-g= if=3Dno --with-tiff=3Dno --x-includes=3D/Developer/SDKs/MacOSX10.6.sdk/usr/= X11/include/:/Developer/SDKs/MacOSX10.6.sdk/usr/X11/include/freetype2

=C2=A0 = =C2=A0 -- Anders
--94eb2c1242ce6c0113054ce85b7c-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 27 15:14:19 2017 Received: (at 25818) by debbugs.gnu.org; 27 Apr 2017 19:14:19 +0000 Received: from localhost ([127.0.0.1]:43222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3orq-0002Os-PO for submit@debbugs.gnu.org; Thu, 27 Apr 2017 15:14:18 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:35437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3orp-0002Oe-0Y for 25818@debbugs.gnu.org; Thu, 27 Apr 2017 15:14:17 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 0F2E622400 for <25818@debbugs.gnu.org>; Thu, 27 Apr 2017 19:10:08 +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-type:content-type:in-reply-to:mime-version:user-agent :date:date:message-id:from:from:references:to:subject:subject; s=dkim; t=1493320206; x=1494184207; bh=4SgDicC07bYPzyIaBUOGY72k LYrEsPYjcwW40i+pSmY=; b=Yp1r8Mrfwf8QE9hmDqHUsZU8P3Eyjjj/T0HI1xnX +Ro1jOX9Dye9iKzymDqxqm/4iTCv0R+x10QZD02LQJYCiz2hL/YHiWuAPgobIfoj K1FE9cL23yRmmLJMfXi3OjQFWovGJ2sdwqxFQ29OetNAQTO3HOOmtQwdkZS8i4M8 v3g= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 d2OiPbDX8J9s for <25818@debbugs.gnu.org>; Thu, 27 Apr 2017 19:10:06 +0000 (UTC) Received: from [192.168.1.106] (179.133.105.92.dynamic.wline.res.cust.swisscom.ch [92.105.133.179]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id B1A07223E5; Thu, 27 Apr 2017 19:10:04 +0000 (UTC) Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: Anders Lindgren References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> From: "Charles A. Roelli" Message-ID: Date: Thu, 27 Apr 2017 21:14:05 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------55AD41D0C9147250318857EA" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, alan@idiocy.org, martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) This is a multi-part message in MIME format. --------------55AD41D0C9147250318857EA Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Anders, As discussed off-list, the copyright assignment is done. I fixed the patch so that child frames are never constrained (after some testing, it seems that a child frame cannot get stuck off screen as long as its parent is still visible). To test this out, evaluate the following from emacs -Q, (progn (setq test-frame (make-frame `((parent-frame . ,(selected-frame))))) (set-frame-position test-frame 0 500)) and drag the parent frame down until its child is off screen. When the parent is moved back up, the child should reappear with it. (Assuming Spaces is off; not sure what would happen in OS X 10.9+ in this case when Spaces is on... I guess the child would be constrained before it is placed off screen?). I've also CC'ed Alan since this change is related to the new frame parameters. Cheers, Charles --------------55AD41D0C9147250318857EA Content-Type: text/x-patch; name="0001-Constrain-non-child-frames-to-screen-area-in-OS-X.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Constrain-non-child-frames-to-screen-area-in-OS-X.patch" >From d2ed9a7bed8872bd89c32d3475607a6e5a271198 Mon Sep 17 00:00:00 2001 From: Charles A. Roelli Date: Thu, 27 Apr 2017 20:44:09 +0200 Subject: [PATCH] Constrain non-child frames to screen area in OS X * src/nsterm.m (constrainFrameRect:toScreen:): Constrain non-child frames in OS X, if they would otherwise go offscreen. Fixes: debbugs:25818 --- src/nsterm.m | 35 ++++++++++++++++++++++++++++++++++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 8c5eb06..f0495c4 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8011,8 +8011,40 @@ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen NSTRACE_RETURN_RECT (frameRect); return frameRect; } -#endif + else +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 */ + // Check that the proposed frameRect is visible in at least one + // screen. If it is not, ask the system to reposition it (only + // for non-child frames). + + if (!FRAME_PARENT_FRAME (((EmacsView *)[self delegate])->emacsframe)) + { + NSArray *screens = [NSScreen screens]; + NSUInteger nr_screens = [screens count]; + + int i; + BOOL frame_on_screen = NO; + + for (i = 0; i < nr_screens; ++i) + { + NSScreen *s = [screens objectAtIndex: i]; + NSRect scrRect = [s frame]; + + if (NSIntersectsRect(frameRect, scrRect)) + { + frame_on_screen = YES; + break; + } + } + + if (!frame_on_screen) + { + NSTRACE_MSG ("Frame outside screens; constraining"); + frameRect = [super constrainFrameRect:frameRect toScreen:screen]; + NSTRACE_RETURN_RECT (frameRect); + return frameRect; + } + } #endif return constrain_frame_rect(frameRect, -- 1.7.4.4 --------------55AD41D0C9147250318857EA-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 27 16:05:35 2017 Received: (at 25818) by debbugs.gnu.org; 27 Apr 2017 20:05:35 +0000 Received: from localhost ([127.0.0.1]:43268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3pfT-0003jD-50 for submit@debbugs.gnu.org; Thu, 27 Apr 2017 16:05:35 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:35387) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3pfR-0003j1-E0 for 25818@debbugs.gnu.org; Thu, 27 Apr 2017 16:05:34 -0400 Received: by mail-wr0-f180.google.com with SMTP id z52so23176430wrc.2 for <25818@debbugs.gnu.org>; Thu, 27 Apr 2017 13:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=1f4kODHOH+YifoOJ61XSUusvqdsMT24Ye5ccQ5i60Po=; b=A6DtYt52y0THYjkl91MZ1bukiYB0EObFF9CSXUeYRVZT+SfENeMsUOI1RclA5wkc+g AaL8Iyz+EA1U8IZE3kQn+cBo+rUiPglpg3yV7BcnCrE7LndMESyye6SGtGhFlg0HEIT0 CpBcTplkCGYI66USFC3qpEJlMiuDxIFy0Ym7TyYdHTPv0yoQ9ecDfjyA++oLUhf4dC0x jtH4epelAhzvAHhkCJKXaMuSKPqrF4yuQtGZ2Pualc7gt519+t50NUekYNC5IdHIGC2I rQMBhnbhp+3qgZLk2gDLTfJF6+ilWC8ibvOYAf6FaO7JLahRJDgeHzaDYBd3kr1oYaxM S+kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=1f4kODHOH+YifoOJ61XSUusvqdsMT24Ye5ccQ5i60Po=; b=Tfr16mplgv1OJnDrfhSjI24aoYy5Oq5zjmeP6M39q55WLGvmAS0wpFwNvAL5cIq+Uo KJa0MzhEJD3ncxil8eFtFsv5pznJG5ELjR7CQNHAWyyhwn1DseOJMMLpeyCCPd81o0Oe tEvH8hr4OysLwR+q+GbCWKYHNA0IieZZ9HysAxqtahf+X+RvESIo+gitZBoY8+xUjsLC 91r0aTyv2JMKFlBT9oIJMfVhRJpS07UJ0qENAUvxnODJX5ADDDgwbPc6IpyUWRb2GABL pbjo0qGsPWMWJR5J1hmKzzWzWMskSLZ8owwDPff9+L40wKPFcG3DroB2Z4lxq1d8bGlV TlTA== X-Gm-Message-State: AN3rC/4y6wryoUqoa8v3jcml/7thQMZacUAQbOeZ59NZp2Ez1t4iSpRA kdWazL+cA1R1KQ== X-Received: by 10.223.171.79 with SMTP id r15mr5387023wrc.149.1493323527726; Thu, 27 Apr 2017 13:05:27 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-15a3-e624-d188-af62.holly.idiocy.org. [2001:8b0:3f8:8129:15a3:e624:d188:af62]) by smtp.gmail.com with ESMTPSA id q19sm118080wmd.1.2017.04.27.13.05.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Apr 2017 13:05:26 -0700 (PDT) Date: Thu, 27 Apr 2017 21:05:23 +0100 From: Alan Third To: "Charles A. Roelli" Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) Message-ID: <20170427200523.GA51359@breton.holly.idiocy.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, Anders Lindgren , martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) On Thu, Apr 27, 2017 at 09:14:05PM +0200, Charles A. Roelli wrote: > I fixed the patch so that child frames are never constrained (after some > testing, it seems that a child frame cannot get stuck off screen as long as > its parent is still visible). Looks good to me. It doesn’t actually apply here, so I did it manually. I suspect it just needs rebased onto a more recent commit or something. > and drag the parent frame down until its child is off screen. When the > parent is moved back up, the child should reappear with it. If you put the top of the child frame off the top of the screen, then click on it, it jumps back down so the titlebar is visible again. Is this intentional? > * src/nsterm.m (constrainFrameRect:toScreen:): Constrain non-child > frames in OS X, if they would otherwise go offscreen. I can’t find this in CONTRIBUTE, but you’re allowed to specify #ifdef’d code with something like: * src/nsterm.m (constrainFrameRect:toScreen:) [NS_IMPL_COCOA]: Constrain non-child frames if they would otherwise go offscreen. Thanks for working on this. :) -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 28 13:33:13 2017 Received: (at 25818) by debbugs.gnu.org; 28 Apr 2017 17:33:13 +0000 Received: from localhost ([127.0.0.1]:44970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d49lZ-0005CR-7h for submit@debbugs.gnu.org; Fri, 28 Apr 2017 13:33:13 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:36151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d49lW-0005C8-Vr for 25818@debbugs.gnu.org; Fri, 28 Apr 2017 13:33:11 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id C021E22407 for <25818@debbugs.gnu.org>; Fri, 28 Apr 2017 17:29:02 +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-type:content-type:in-reply-to:mime-version:user-agent :date:date:message-id:from:from:references:to:subject:subject; s=dkim; t=1493400540; x=1494264541; bh=X6d31ap31Em06wr39XiEf7Mh kQCjmhBosUd9SjxG6nw=; b=NcO0aAp+/GTqyCvTBrOSR5LAaZtdgN2gukQTmY7s LJ7kPHOqvvmYbwTTs79IlHADL1071BC2yfKBH/sU164D/N37k3sDAuzeBUoIextF XVqIbB92F+0SdWMSkZ1gTDoVGhfgkXNAE9CCkpLGqLp1n0pQ7oOeveRsLosRPNob ShI= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 DP3yseHnn5YX for <25818@debbugs.gnu.org>; Fri, 28 Apr 2017 17:29:00 +0000 (UTC) Received: from [192.168.1.106] (179.133.105.92.dynamic.wline.res.cust.swisscom.ch [92.105.133.179]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id B3847223E5; Fri, 28 Apr 2017 17:28:58 +0000 (UTC) Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: Alan Third References: <20170427200523.GA51359@breton.holly.idiocy.org> From: "Charles A. Roelli" Message-ID: <1df59292-0652-fd04-686f-0e4d4a61105a@aurox.ch> Date: Fri, 28 Apr 2017 19:33:00 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170427200523.GA51359@breton.holly.idiocy.org> Content-Type: multipart/mixed; boundary="------------C38AE984E99F6AFFC0228855" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, Anders Lindgren , martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) This is a multi-part message in MIME format. --------------C38AE984E99F6AFFC0228855 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 27/04/2017 22:05, Alan Third wrote: > Looks good to me. It doesn’t actually apply here, so I did it > manually. I suspect it just needs rebased onto a more recent commit or > something. You're right: attached is the rebased version. >> and drag the parent frame down until its child is off screen. When the >> parent is moved back up, the child should reappear with it. > If you put the top of the child frame off the top of the screen, then > click on it, it jumps back down so the titlebar is visible again. Is > this intentional? For me, this can be prevented by setting variable `ns-auto-hide-menu-bar' to t. And on OS X 10.9+, the behavior may change if you have Spaces enabled (I haven't tested it). >> * src/nsterm.m (constrainFrameRect:toScreen:): Constrain non-child >> frames in OS X, if they would otherwise go offscreen. > I can’t find this in CONTRIBUTE, but you’re allowed to specify > #ifdef’d code with something like: > > * src/nsterm.m (constrainFrameRect:toScreen:) [NS_IMPL_COCOA]: > Constrain non-child frames if they would otherwise go offscreen. > > Thanks for working on this. :) My pleasure, and thank you for your work on the NS port. --------------C38AE984E99F6AFFC0228855 Content-Type: text/x-patch; name="0001-Constrain-non-child-frames-to-screen-area-in-OS-X.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Constrain-non-child-frames-to-screen-area-in-OS-X.patch" >From 6a68480187916af3136e36596f50226f3544ded4 Mon Sep 17 00:00:00 2001 From: Charles A. Roelli Date: Thu, 27 Apr 2017 20:44:09 +0200 Subject: [PATCH] Constrain non-child frames to screen area in OS X * src/nsterm.m (constrainFrameRect:toScreen:): Constrain non-child frames in OS X, if they would otherwise go offscreen. Fixes: debbugs:25818 --- src/nsterm.m | 35 ++++++++++++++++++++++++++++++++++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index f75a9fe..c22c5a7 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8040,7 +8040,40 @@ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen NSTRACE_RETURN_RECT (frameRect); return frameRect; } -#endif + else +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 */ + // Check that the proposed frameRect is visible in at least one + // screen. If it is not, ask the system to reposition it (only + // for non-child windows). + + if (!FRAME_PARENT_FRAME (((EmacsView *)[self delegate])->emacsframe)) + { + NSArray *screens = [NSScreen screens]; + NSUInteger nr_screens = [screens count]; + + int i; + BOOL frame_on_screen = NO; + + for (i = 0; i < nr_screens; ++i) + { + NSScreen *s = [screens objectAtIndex: i]; + NSRect scrRect = [s frame]; + + if (NSIntersectsRect(frameRect, scrRect)) + { + frame_on_screen = YES; + break; + } + } + + if (!frame_on_screen) + { + NSTRACE_MSG ("Frame outside screens; constraining"); + frameRect = [super constrainFrameRect:frameRect toScreen:screen]; + NSTRACE_RETURN_RECT (frameRect); + return frameRect; + } + } #endif return constrain_frame_rect(frameRect, -- 1.7.4.4 --------------C38AE984E99F6AFFC0228855-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 29 06:30:46 2017 Received: (at 25818) by debbugs.gnu.org; 29 Apr 2017 10:30:46 +0000 Received: from localhost ([127.0.0.1]:45561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4PeI-0004cj-1o for submit@debbugs.gnu.org; Sat, 29 Apr 2017 06:30:46 -0400 Received: from mout.gmx.net ([212.227.15.19]:49195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4PeF-0004cB-Vq for 25818@debbugs.gnu.org; Sat, 29 Apr 2017 06:30:44 -0400 Received: from [192.168.1.100] ([213.162.68.115]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MY86C-1dZ7nN3U4O-00Us4b; Sat, 29 Apr 2017 12:30:17 +0200 Message-ID: <59046B35.1010808@gmx.at> Date: Sat, 29 Apr 2017 12:30:13 +0200 From: martin rudalics MIME-Version: 1.0 To: "Charles A. Roelli" , Anders Lindgren Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:WWiGwC8gEdb0HVjA/ZAUfKzEceQIgxBoHGmqIauwOOsor2b5ryc xyjgK9O/25m6lbSTe4hG80cpQNjZ4ARodBmyrmyOpuY6nPtmL3Kkz/2L+PvSMmQO57pKbzw AFB5FBRjvIOQgZE7uZYsTuvDb/zj9GpCTIwOQHN3Z7xSP4py2qxTDpYh8m1iAVM7vEA61lu RtaM1JtqXtZNh9FufiW5g== X-UI-Out-Filterresults: notjunk:1;V01:K0:OXYEBYtHpDY=:bLRh9VGShgt+UvvCeaIgiL 9Gt3uCQ9pfrB5eO3CC+LdzWNBiOtnmD74ce/7BfunIQ/IDFfRMQCHBtT/+6PPttafmxscjX2S QHaPiK2Ix2EKTI42A5iFO8bfEnhIgCtVDwJx3Bi/GsFoTSNvkPC20kX6MmjpvSmO1KsFE5gN5 HnpFA46LVkfP+tsSd5cKuCFOK+A8O19Z4bm1qNgqojsSV9uCfuQbBKK8H8V1V4GWtM42wMAnU zF9KIwggIE3DEnKVHUylLKGABrvuFwWsK+3JPBVYBkzffFxriVlUFaaeoIXW4Jfz7dn46NBt2 ACX+cf7+BQQhM1ziW5H8re2vKsKOS0TMmQPtXYZnDVT871xmjCOflSDegdj7Anh5jWlhDkUVi QgHJ22182MJDPkRWYOgH3htNJAYFT/povWKC2ZxdhGIq9PutjKVX6DWgtnCdsEJnXH8O9QN+c N1GH50hlb+SEY9qY7ge5dElvuWXlzDSKYIGM3uCnIdMCZpHC16Hv5/kIVDVDZrsAkXD0AIXJL aAMWaKTpVvCwYWBNjBFZfIbgf5TjgxOuN2N1TqmjSn425FNY8u0WcpS33I/otIB/ne2OyJLMP DdujXMyjNbTMZYuZI3bLRA+ETGFMUQbYF/lg5eSDRfj064ZmybtWzJ0RFUzbBtMnHz2LYFtHh tUL1OBvij9Ux22KlD3oH2n0kKjHOjlFhS2xPTFTteABhFrLEscIVELDXHP24o3o679WIbMnbi Zq8AgZSEvRD1Y9e4j+GEDmfOyeg8o2vsWEw4DE7BF1uKvFJNeIP5/ZhNq7kyKCbG77G8UC6LJ EharUyp/WAFuh92yjAd4vzmZLqA+Q== X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, alan@idiocy.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) > I fixed the patch so that child frames are never constrained (after > some testing, it seems that a child frame cannot get stuck off screen > as long as its parent is still visible). To test this out, evaluate > the following from emacs -Q, > > (progn > (setq test-frame (make-frame `((parent-frame . ,(selected-frame))))) > (set-frame-position test-frame 0 500)) > > and drag the parent frame down until its child is off screen. Does this mean that the child frame does _not_ move together with its parent frame? That would constitute a major deviation from the other platforms. martin From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 29 07:15:22 2017 Received: (at 25818) by debbugs.gnu.org; 29 Apr 2017 11:15:22 +0000 Received: from localhost ([127.0.0.1]:45586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4QLS-0005ex-7i for submit@debbugs.gnu.org; Sat, 29 Apr 2017 07:15:22 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:36547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4QLP-0005ej-D7 for 25818@debbugs.gnu.org; Sat, 29 Apr 2017 07:15:20 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id CD8D822407 for <25818@debbugs.gnu.org>; Sat, 29 Apr 2017 11:11:10 +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:in-reply-to :mime-version:user-agent:date:date:message-id:from:from :references:to:subject:subject; s=dkim; t=1493464268; x= 1494328269; bh=0UB9Osa69W8y+3Qo1vpZXDt8L3GfUbqleU75OwDmVoI=; b=k Zf4g3df/Vb0avVRlESzJ+tsEJejuxCt6Cg9qe/gs9Zid6iJj+/68YE5MPAuncL6Z LsURMunhEl4IyztX+N36zZCGEwsgFfTdx35Z0iFDL0gQGBAeRlLNUa9HKTM4LQxY b3e1dAKMUDkeuT7VbmhQdYh1UKgVGRHbwTccQ2qgrg= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 Yyp765O2YNEg for <25818@debbugs.gnu.org>; Sat, 29 Apr 2017 11:11:08 +0000 (UTC) Received: from [192.168.1.106] (179.133.105.92.dynamic.wline.res.cust.swisscom.ch [92.105.133.179]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 6713822151; Sat, 29 Apr 2017 11:11:08 +0000 (UTC) Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: martin rudalics , Anders Lindgren References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> <59046B35.1010808@gmx.at> From: "Charles A. Roelli" Message-ID: <39f502e9-7b31-a250-c964-8977689cad9b@aurox.ch> Date: Sat, 29 Apr 2017 13:15:10 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <59046B35.1010808@gmx.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, alan@idiocy.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) With the current master branch, a child frame might be constrained on OS X 10.9+ with the "Spaces" windowing feature turned on, meaning that a child frame could be forced back into the screen area -- so yes, there could be a case where a child frame doesn't move together with its parent. Maybe that will have to be fixed too; I'm on 10.6 though so I can't test. Otherwise, though, when child/parent frames are not brought off screen, a child frame always moves with its parent. My updated patch takes into account the case where "Spaces" is off or unavailable -- if you read the part above what I added: #ifdef NS_IMPL_COCOA #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 // If separate spaces is on, it is like each screen is independent. There is // no spanning of frames across screens. if ([NSScreen screensHaveSeparateSpaces]) { NSTRACE_MSG ("Screens have separate spaces"); frameRect = [super constrainFrameRect:frameRect toScreen:screen]; NSTRACE_RETURN_RECT (frameRect); return frameRect; } #endif there is nothing there to prevent a child frame from being constrained -- so I will need input from somebody else on that. On 29/04/2017 12:30, martin rudalics wrote: > > I fixed the patch so that child frames are never constrained (after > > some testing, it seems that a child frame cannot get stuck off screen > > as long as its parent is still visible). To test this out, evaluate > > the following from emacs -Q, > > > > (progn > > (setq test-frame (make-frame `((parent-frame . ,(selected-frame))))) > > (set-frame-position test-frame 0 500)) > > > > and drag the parent frame down until its child is off screen. > > Does this mean that the child frame does _not_ move together with its > parent frame? That would constitute a major deviation from the other > platforms. > > martin From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 29 10:51:23 2017 Received: (at 25818) by debbugs.gnu.org; 29 Apr 2017 14:51:23 +0000 Received: from localhost ([127.0.0.1]:46466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4TiV-0004Cg-2A for submit@debbugs.gnu.org; Sat, 29 Apr 2017 10:51:23 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:38446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4TiT-0004CU-Dl for 25818@debbugs.gnu.org; Sat, 29 Apr 2017 10:51:21 -0400 Received: by mail-wm0-f52.google.com with SMTP id r190so68984305wme.1 for <25818@debbugs.gnu.org>; Sat, 29 Apr 2017 07:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=4pf43MA0ttGHsjH/pGabJpNeUpuF/Uedo7fJY99dFLo=; b=d4RbYk7S8Odx9oHSBhMcDwhJMuB9CFwd+LBCHFzf87tD2EpZJ3wcx1upvfyZvXLxRN ugIUOXRewQtQsnSiSbC2sOysnRlFuBej3P4nXasph5CJ0qjabOQ1EhKOzsbuQ3wRgjJk HgVXbuO/OOq1Rz1IN3iyTGoSzpXeioK3KnFvXU6bWwn8A0rRHzpXFx9Ok2ADK8igCVuA l9gzwaFMm79qw98umjSFZrohBMIieL2ltANZvyuiQwUwXc3R5bsZwiGOmUh65VzHlfR6 cGJq/oDMSQNLcbMmNINxRTEqv458+pTpe7Mw0CidyPjCuB6cc56GmDN2zk+wlFq0LFKf d72Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=4pf43MA0ttGHsjH/pGabJpNeUpuF/Uedo7fJY99dFLo=; b=MMCTsecqPmLaI0SrsX9S5JradqClFC7Qxam8wJ2uTcXxG/xhmJXz6SvOA6zful16/z EsWfv4ToCRN7B07xBhrba2t3e2eVLgfpGX4wS5I4Y/4wXUa2uEvS6OKuTSsp2xWw/MHT ZZDuJLoLNkC08nKTGyyxb8fc5AtYVSAJ9Tt3DAsLXSQ3A2nDPCeIXj+D6ENPQj8Czo5q +vh6VGp6i3edrhq6HMNT1cWS068hF0AUJGshkl08S662oWAb0QY3In2lBlqFDFnENVAt 4Oiwm1jWVwrkKbh4UlIp8m9ofdt/+B7o2uuXMm575s2uDM5xU218RueYfD/a2iQI4n/w 0CHw== X-Gm-Message-State: AN3rC/78ktkEPQ8zVHhTCOana90+N5IO/5vLzfxTn2sqC76uhiaL2Pkh oZ8I7ZRpkO6+Bg== X-Received: by 10.28.10.1 with SMTP id 1mr2018568wmk.84.1493477475489; Sat, 29 Apr 2017 07:51:15 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-50f6-0664-c41f-3461.holly.idiocy.org. [2001:8b0:3f8:8129:50f6:664:c41f:3461]) by smtp.gmail.com with ESMTPSA id u4sm7636231wmu.0.2017.04.29.07.51.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Apr 2017 07:51:13 -0700 (PDT) Date: Sat, 29 Apr 2017 15:51:11 +0100 From: Alan Third To: "Charles A. Roelli" Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) Message-ID: <20170429145111.GA88258@breton.holly.idiocy.org> References: <59046B35.1010808@gmx.at> <39f502e9-7b31-a250-c964-8977689cad9b@aurox.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <39f502e9-7b31-a250-c964-8977689cad9b@aurox.ch> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 25818 Cc: martin rudalics , Anders Lindgren , 25818@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) On Sat, Apr 29, 2017 at 01:15:10PM +0200, Charles A. Roelli wrote: > My updated patch takes into account the case where "Spaces" is off or > unavailable -- if you read the part above what I added: > > #ifdef NS_IMPL_COCOA > #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9 > // If separate spaces is on, it is like each screen is independent. There > is > // no spanning of frames across screens. > if ([NSScreen screensHaveSeparateSpaces]) > { > NSTRACE_MSG ("Screens have separate spaces"); > frameRect = [super constrainFrameRect:frameRect toScreen:screen]; > NSTRACE_RETURN_RECT (frameRect); > return frameRect; > } > #endif > > there is nothing there to prevent a child frame from being constrained -- so > I will need input from somebody else on that. I think the screensHaveSeparateSpaces setting makes each monitor a completely independent screen, so you won’t run into the problems you have in the normal set‐up where a frame might span two monitors. Therefore I think we could just add a check for whether it’s a child frame, and if so, don’t constrain it at all. -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 29 13:23:23 2017 Received: (at 25818) by debbugs.gnu.org; 29 Apr 2017 17:23:23 +0000 Received: from localhost ([127.0.0.1]:46559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4W5b-0007hB-0D for submit@debbugs.gnu.org; Sat, 29 Apr 2017 13:23:23 -0400 Received: from mail-ua0-f178.google.com ([209.85.217.178]:34189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4W5Z-0007gy-7n for 25818@debbugs.gnu.org; Sat, 29 Apr 2017 13:23:22 -0400 Received: by mail-ua0-f178.google.com with SMTP id q26so15263249uaa.1 for <25818@debbugs.gnu.org>; Sat, 29 Apr 2017 10:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VsW+R15eWDaOKIS38XFJU+R7VA8Ko3HQWFNI3d5a3jY=; b=P49Y9xSX2zFhniYaikemyLdzrAUVHnBanlrGe3j4zBVTEZAHDPJIV168pFBWC6BjlO kNNkuma+XWgyZtvhN8mRF7wpbi0VWUkGx/AFuaXUGcBmJzWlX7n5LgCfykXmGuUWM0cL 8hWGkFFudU0PyOXyuKL+1AKhYdMtsATUx6zvDFpas6kFjLeuLUH/2eT/1MXh11mVr6/a 5h+pLYP3x7Qz1iiOx6se9SSQ23GwEcBAXl7PhjDL/YEhmSHI7Jp2COod/SQ9Op8uje67 1/7trzJXFFu1nsk4oHCn5koDiChBkaQWdQAKWNSwYS0JPuzpl4DcLErbtxfNklElbSqh OAQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VsW+R15eWDaOKIS38XFJU+R7VA8Ko3HQWFNI3d5a3jY=; b=pMRad8B0BIrN/S2grbVIg9Wx0ZJwz8CutKrqGWCwNQaSh/h4Ev34x6P3B0QraeMclw ko/wbaHGoKKVm1R1ZFCPzWXybIje+dGfhvDqc/S31djO8DBIUp+ErGcfjZuXnsxQQEeH qe9f5JASdBk/XzG2mOs94qXXKambw7Z9NrbBg1Ijpnn2EnIjv0QSWKnod1qzmXgf0cJV LFf7307Uja7ke4PNrnTutqRdett5TO6Kin4KDcreZJ0jFyCNNxILLz4lQp+eNgIyfe0Z 5DJSqgW99voNwMH2GjB3afzy0NPxXteM4O45/BjfuKgvrrx13ACtUP7MNCJ+sCLyyik5 LdOA== X-Gm-Message-State: AN3rC/43wPCzByjA1KIn68PFUx3ml676YCSz/+1cigBadZdOt5mRjAcY qWxAG6KULpkoSrBVnqtBLPcxVh0S6g== X-Received: by 10.159.39.196 with SMTP id b62mr9131339uab.108.1493486595639; Sat, 29 Apr 2017 10:23:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.64.140 with HTTP; Sat, 29 Apr 2017 10:23:14 -0700 (PDT) In-Reply-To: <39f502e9-7b31-a250-c964-8977689cad9b@aurox.ch> References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> <59046B35.1010808@gmx.at> <39f502e9-7b31-a250-c964-8977689cad9b@aurox.ch> From: Anders Lindgren Date: Sat, 29 Apr 2017 19:23:14 +0200 Message-ID: Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: "Charles A. Roelli" Content-Type: multipart/alternative; boundary=94eb2c12334402910e054e51726d X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25818 Cc: martin rudalics , Alan Third , 25818@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --94eb2c12334402910e054e51726d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! If I understand correctly, when the menu bar is visible, macOS will force any window down below it. It's not something one can do about it, as far as I know. However, when the menu bar is hidden, or on secondary monitors (i.e. one that don't have a menu bar), a window can be placed above the top programmatically (but it's not possible for a user to drag it there). The reason the Emacs code checks if spaces are enabled is historical. The original NS code in Emacs 23 didn't support stretching a frame across two monitors (whereas Emacs 22 supported this). When this was fixed for Emacs 23 the maintainer of the time, Jan Dj=C3=A4rv, decided to retain the origin= al behaviour when spaces are enabled (since a frame can't be stretched across multiple monitors). Maybe this is something we could revisit now. (One thing I'm curious about is if it is possible to hide the menu bar and place the frame above the top of the display, if spaces are enabled -- I suspect that it's not possible but I haven't tested.) -- Anders On Sat, Apr 29, 2017 at 1:15 PM, Charles A. Roelli wrote= : > With the current master branch, a child frame might be constrained on OS = X > 10.9+ with the "Spaces" windowing feature turned on, meaning that a child > frame could be forced back into the screen area -- so yes, there could be= a > case where a child frame doesn't move together with its parent. Maybe th= at > will have to be fixed too; I'm on 10.6 though so I can't test. > > Otherwise, though, when child/parent frames are not brought off screen, a > child frame always moves with its parent. > > My updated patch takes into account the case where "Spaces" is off or > unavailable -- if you read the part above what I added: > > #ifdef NS_IMPL_COCOA > #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. > There 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 > > there is nothing there to prevent a child frame from being constrained -- > so I will need input from somebody else on that. > > > > On 29/04/2017 12:30, martin rudalics wrote: > >> > I fixed the patch so that child frames are never constrained (after >> > some testing, it seems that a child frame cannot get stuck off screen >> > as long as its parent is still visible). To test this out, evaluate >> > the following from emacs -Q, >> > >> > (progn >> > (setq test-frame (make-frame `((parent-frame . ,(selected-frame))))= ) >> > (set-frame-position test-frame 0 500)) >> > >> > and drag the parent frame down until its child is off screen. >> >> Does this mean that the child frame does _not_ move together with its >> parent frame? That would constitute a major deviation from the other >> platforms. >> >> martin >> > > --94eb2c12334402910e054e51726d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

If I understand correctly, when the= menu bar is visible, macOS will force any window down below it. It's n= ot something one can do about it, as far as I know.

However, when the menu bar is hidden, or on secondary monitors (i.e. one = that don't have a menu bar), a window can be placed above the top progr= ammatically (but it's not possible for a user to drag it there).
<= div>
The reason the Emacs code checks if spaces are enabled i= s historical. The original NS code in Emacs 23 didn't support stretchin= g a frame across two monitors (whereas Emacs 22 supported this). When this = was fixed for Emacs 23 the maintainer of the time, Jan Dj=C3=A4rv, decided = to retain the original behaviour when spaces are enabled (since a frame can= 't be stretched across multiple monitors). Maybe this is something we c= ould revisit now. (One thing I'm curious about is if it is possible to = hide the menu bar and place the frame above the top of the display, if spac= es are enabled -- I suspect that it's not possible but I haven't te= sted.)

=C2=A0 =C2=A0 -- Anders

On Sat, Apr 29, 2017 at 1= :15 PM, Charles A. Roelli <charles@aurox.ch> wrote:
With the current master branch, a child frame migh= t be constrained on OS X 10.9+ with the "Spaces" windowing featur= e turned on, meaning that a child frame could be forced back into the scree= n area -- so yes, there could be a case where a child frame doesn't mov= e together with its parent.=C2=A0 Maybe that will have to be fixed too; I&#= 39;m on 10.6 though so I can't test.

Otherwise, though, when child/parent frames are not brought off screen, a c= hild frame always moves with its parent.

My updated patch takes into account the case where "Spaces" is of= f or unavailable -- if you read the part above what I added:

#ifdef NS_IMPL_COCOA
#if MAC_OS_X_VERSION_MAX_ALLOWED >=3D MAC_OS_X_VERSION_10_9
=C2=A0 // If separate spaces is on, it is like each screen is independent.= =C2=A0 There is
=C2=A0 // no spanning of frames across screens.
=C2=A0 if ([NSScreen screensHaveSeparateSpaces])
=C2=A0 =C2=A0 {
=C2=A0 =C2=A0 =C2=A0 NSTRACE_MSG ("Screens have separate spaces")= ;
=C2=A0 =C2=A0 =C2=A0 frameRect =3D [super constrainFrameRect:frameRect toSc= reen:screen];
=C2=A0 =C2=A0 =C2=A0 NSTRACE_RETURN_RECT (frameRect);
=C2=A0 =C2=A0 =C2=A0 return frameRect;
=C2=A0 =C2=A0 }
#endif

there is nothing there to prevent a child frame from being constrained -- s= o I will need input from somebody else on that.



On 29/04/2017 12:30, martin rudalics wrote:
> I fixed the patch so that child frames are never constrained (after > some testing, it seems that a child frame cannot get stuck off screen<= br> > as long as its parent is still visible).=C2=A0 To test this out, evalu= ate
> the following from emacs -Q,
>
> (progn
>=C2=A0 =C2=A0 (setq test-frame (make-frame `((parent-frame . ,(selected= -frame)))))
>=C2=A0 =C2=A0 (set-frame-position test-frame 0 500))
>
> and drag the parent frame down until its child is off screen.

Does this mean that the child frame does _not_ move together with its
parent frame?=C2=A0 That would constitute a major deviation from the other<= br> platforms.

martin


--94eb2c12334402910e054e51726d-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 30 04:32:59 2017 Received: (at 25818) by debbugs.gnu.org; 30 Apr 2017 08:32:59 +0000 Received: from localhost ([127.0.0.1]:46901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4kHr-0005YY-CF for submit@debbugs.gnu.org; Sun, 30 Apr 2017 04:32:59 -0400 Received: from mout.gmx.net ([212.227.15.15]:55964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d4kHp-0005YE-VY for 25818@debbugs.gnu.org; Sun, 30 Apr 2017 04:32:58 -0400 Received: from [192.168.1.101] ([213.162.68.37]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M5Lqx-1e1HQM1XtH-00zUWB; Sun, 30 Apr 2017 10:32:33 +0200 Message-ID: <5905A11B.1090101@gmx.at> Date: Sun, 30 Apr 2017 10:32:27 +0200 From: martin rudalics MIME-Version: 1.0 To: "Charles A. Roelli" , Anders Lindgren Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) References: <58AEA232.4000708@gmx.at> <58B30634.1090904@gmx.at> <58B3DDBA.6060003@gmx.at> <59046B35.1010808@gmx.at> <39f502e9-7b31-a250-c964-8977689cad9b@aurox.ch> In-Reply-To: <39f502e9-7b31-a250-c964-8977689cad9b@aurox.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:LLDlUa06Ty2g6OOaF06U+5gGSpCu3aBtIBCWpIMWpZUp/8L7kWF jKeYSXxlbMouq6r/MIRFfVPML+3b0KuBBWIaNlD7GrIDPeuvH0g96ZHyyiYbDioWqDKWcrp GqM8PJZiEEPUZEvjdMkx0yVwbrweWivkpZfdpf8TCSE/ZYiMB2euj7bv6XqkhCC9vtwpJ6o PA8USJo7HlVSDr3w4lhjA== X-UI-Out-Filterresults: notjunk:1;V01:K0:16SdW9JbNrU=:UdXoqYxIIqrvOCBDK23kyh ggQLnWq/sfo/CPlwLzYlDzC9Uq+xLO4ggNIlJi+/HeoB2jdDMQryorzbHWD6b2uAM3S2kNpXE QqlgGPhUd7Q6CyU/ewdeJYCBnxc+PJBRQMpx03yXc8Vd67WPdcVimBNkix3U5BmpwBxyORFpq Iwn2GZMZR5vnIKzbF/jnSv5wp7mO9sX21LaMir7hkyijCCLZl0rwQJ2Q8MsZVGTVlRnP6wdOV ZhRSE8VjjVhzU3pXkNw51w/XGQmrNzmeu4cf01bwZLSP62Fz22nV18Jmh7iPjoh7/VkvrPpC4 GtfSoie2EDbvWTQPzrlXXdViBhNcZjUa468BPFiYqhuVDIjcaE+bLXxFnsvHKNf/y3qFm3vJR qoBY+Mz9rqUuHjUWk9oMRf7uMmH6eplkKGBHm7R8ZgKwepEcltiFugELRZEVqiNWorvV5JBjy C5IYVrDvnFdTkcr/lJ93Nlf0WLiv+NV9W/AJOlVoehLUKySiqamYq73HCdgqWzD3T+iZd/IAm SaovlJ2nVFwofG+7UAqYorbJj92H6WNvM8R4NklayEH6DidXH0GdoH5E3pjC+ZaVws33QIkYj TNlXDV1YHmbqdZwmBafabsW4XujHrtojy7TGjYOh4umxuNBZYgJ9AxGi3AZpl464L8JhDnqK1 rzOM7GqvDvVguPbLZszaViK8jkGiP88JVov/Ejf4eCXH/QSZ7YbPcBtdoEEvnUD3wJYmjES09 EdZxUpXNIMb7NSvGj1Bao20Ta4vSWr2uYwQKWrqSon/P628zBxlxcMcRqgoym1GxopfhrpnXK k7PYT67 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, alan@idiocy.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.5 (---) > Otherwise, though, when child/parent frames are not brought off > screen, a child frame always moves with its parent. Thanks for this clarification, martin From debbugs-submit-bounces@debbugs.gnu.org Tue May 02 16:33:45 2017 Received: (at 25818) by debbugs.gnu.org; 2 May 2017 20:33:46 +0000 Received: from localhost ([127.0.0.1]:51581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5eUT-00022v-O9 for submit@debbugs.gnu.org; Tue, 02 May 2017 16:33:45 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5eUS-00022j-I8 for 25818@debbugs.gnu.org; Tue, 02 May 2017 16:33:44 -0400 Received: by mail-wm0-f42.google.com with SMTP id w64so125685738wma.0 for <25818@debbugs.gnu.org>; Tue, 02 May 2017 13:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Qp9lbtScVOdob7A3eukECwP98z9X+NYyCs5/MR4DZVA=; b=kNahGA//uvMDg7avccIZKas4WTv58B15ObcOKp+vc8LKcTxyhHNFn7H0UJCKwZbZIy O0DOC58z89d5gZKe1wbfIFmmARZSQi3DlAbcSU65NZPIC6svCe6O5HZ+XaNerXidjjIi D6sa3WTRjTClfsElnt3MMYfSeTdoicvmO0TL71p/g2wrxE3bABwRH1/Q0RNncfYh+eaC WaVvDgWPM+XQ2kErzYrdYJ6pJsS65b7b6Libiy+UTW1CacvfDA1It0NvqSD9SahSFT4G EhmfGwu2HWPG9dlXivBxQgq4ahvp0WmkwE7YQPbUuppKBHQN0ZXsvBiKjw5l+XViU1to 4rpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Qp9lbtScVOdob7A3eukECwP98z9X+NYyCs5/MR4DZVA=; b=c7b20DG3xA/609mz1oiP5FSfCOVSaJoDA8zlTTy/COd+CMnqLtIxt5EGdKnTF9UJaT OnzH0vAZOIiIcea4i9/biihoI54hWcfPDxK/+he56CTo+0y1yN2hwoA+Od+LK7M1GSkn 4H5WHLt2YdqXJk5X6vvl+EiGNZwKYMqccHwguESkM9i+oOvrVWS5dLmx0/qE9uI9ySpm vjqW5dHvCtuvaZJCTTYNl2rm5nivzfrHpOhafvpUANxPl3PvilJIS/29OKoplujTjgHU o7pntQcdIeeF4z8S/V8f+vVjbaGBEwvMqnZuL2akFHvMq1jnj/GaQ3pYKafWVBl36u2k QOFQ== X-Gm-Message-State: AN3rC/4n2cV/isQmwmbLz3Jdktd4ZdKqH65+262UmyncHYFT4fMIo/bj 7K+5Jdtuc0Ocag== X-Received: by 10.28.29.72 with SMTP id d69mr3642981wmd.25.1493757218812; Tue, 02 May 2017 13:33:38 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-50f6-0664-c41f-3461.holly.idiocy.org. [2001:8b0:3f8:8129:50f6:664:c41f:3461]) by smtp.gmail.com with ESMTPSA id t26sm11898375wra.43.2017.05.02.13.33.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2017 13:33:37 -0700 (PDT) Date: Tue, 2 May 2017 21:33:34 +0100 From: Alan Third To: "Charles A. Roelli" Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) Message-ID: <20170502203334.GA78670@breton.holly.idiocy.org> References: <20170427200523.GA51359@breton.holly.idiocy.org> <1df59292-0652-fd04-686f-0e4d4a61105a@aurox.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1df59292-0652-fd04-686f-0e4d4a61105a@aurox.ch> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, Anders Lindgren , martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On Fri, Apr 28, 2017 at 07:33:00PM +0200, Charles A. Roelli wrote: > On 27/04/2017 22:05, Alan Third wrote: > > Looks good to me. It doesn’t actually apply here, so I did it > > manually. I suspect it just needs rebased onto a more recent commit or > > something. > You're right: attached is the rebased version. I’ve pushed this up to master. Should I close this bug report, or do we want to look into the case where screens have individual spaces? -- Alan Third From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 14:30:30 2017 Received: (at 25818) by debbugs.gnu.org; 5 May 2017 18:30:30 +0000 Received: from localhost ([127.0.0.1]:56687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6hzq-000209-DA for submit@debbugs.gnu.org; Fri, 05 May 2017 14:30:30 -0400 Received: from sinyavsky.aurox.ch ([37.35.109.145]:40452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6hzo-0001zv-7v for 25818@debbugs.gnu.org; Fri, 05 May 2017 14:30:28 -0400 Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 4051422417 for <25818@debbugs.gnu.org>; Fri, 5 May 2017 18:26:10 +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:in-reply-to :mime-version:user-agent:date:date:message-id:from:from :references:to:subject:subject; s=dkim; t=1494008768; x= 1494872769; bh=H8XwgHK7DKrmA0XilWa9mshhe6V0wP1VbAyvhoh+Mqk=; b=S eCvjnOt/wwP4qaZy/uBU1qRbY/9C6fgWmE+GKuOri0Utimxp7E4F8UR9DtD7fD9r uacZmVvrbu1F349uDCv+3RAoNQynVL8p0YXscHXglm+JIJRMN8fS/3WK8frhV6rj hvCneCzwRc6KxENgRtx/YdBUfcb8P2qYHzXpkBSDt4= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com 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 Ry8Y4fNhp2Aw for <25818@debbugs.gnu.org>; Fri, 5 May 2017 18:26:08 +0000 (UTC) Received: from [192.168.1.106] (179.133.105.92.dynamic.wline.res.cust.swisscom.ch [92.105.133.179]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 2ACB322151; Fri, 5 May 2017 18:26:08 +0000 (UTC) Subject: Re: bug#25818: 25.2; frame moved off display does not return (OS X) To: Alan Third References: <20170427200523.GA51359@breton.holly.idiocy.org> <1df59292-0652-fd04-686f-0e4d4a61105a@aurox.ch> <20170502203334.GA78670@breton.holly.idiocy.org> From: "Charles A. Roelli" Message-ID: Date: Fri, 5 May 2017 20:30:26 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170502203334.GA78670@breton.holly.idiocy.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25818 Cc: 25818@debbugs.gnu.org, Anders Lindgren , martin rudalics X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I'm ok with closing. The behavior with "Spaces" turned on seems reasonable at the moment, and if there's any indication that child frames do get constrained as a result of it, we can fix that. From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 14:34:34 2017 Received: (at control) by debbugs.gnu.org; 5 May 2017 18:34:34 +0000 Received: from localhost ([127.0.0.1]:56693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6i3l-00025t-TL for submit@debbugs.gnu.org; Fri, 05 May 2017 14:34:34 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6i3j-00025f-Tv for control@debbugs.gnu.org; Fri, 05 May 2017 14:34:32 -0400 Received: by mail-wm0-f67.google.com with SMTP id y10so2973432wmh.0 for ; Fri, 05 May 2017 11:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:message-id:to:from:subject; bh=7/dZUDd33OV6Me1Owi4Kz58Z7BxxjSrVP37ma14cong=; b=Hd6SylUQbBJCC5LR5KcXGCHssM4wjaXaOJ9G/T3Kj4YmqfZ1+dO0jsgfO2/7AHed3U 9pJx2chEZEnEYEAfQo7HAf+jsStYAvZxMnvRMFUUCCIvk54WK+5WK/vfldK1CZnVpMOn NRAQoXQ8Qy1c5H/SvOngyZs95LsNflBlmm1LSEpkhSN3Ivxenq74lCnZIh5gOtZ9BAzF Ip8UEEaesauLCj7weJmtPOWROq+vadQl1ddvvPlbEsvyqpwvvoqGnFatHDIFT+RqvqpV n4lMjpWqoi48wgAFOAr9ejuXUAVpSy33bruiHbwguRKd5HC+d7Kpp376FicjCUPZV7Md pDxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:to:from:subject; bh=7/dZUDd33OV6Me1Owi4Kz58Z7BxxjSrVP37ma14cong=; b=nqCzzGdyZiseKnvRxWk1LWkSo3cfSKVvv6H12OEjxVuO4f4Mh1agDWIxTcTzOleQng 2oWtZpWQebM8zS2W+ZoIiE6wpNpT5EmqRs1Q5ZgayW4NQGGi4FdaFmQXkUr0aHd9Nisd O0hoEuIt+GT+LvYFUgEBFtGWY0jehcnbedqhext6Ym5xD2sFwvY0UUeVZ8E6wZiau+Na t/J2pAsST16yboj5JcfqINwjmaTwNCRWUAdGyP8ntcplsDlwzP2XMXxrJM8p5PlX4RCo 3CcaSWu+x/wCGrsDWoMzEOVx6nsDuOwOOoMzg+XrWPptrvnH/Cu6+kDVNsghcb/js3io icqQ== X-Gm-Message-State: AN3rC/7p+KegTOBe2+wLSpK/E5fo92rxMo79wdWwTYlemxC5gjTyKkJD WmC4Rg6qqEkKH+EWN5Y= X-Received: by 10.28.163.129 with SMTP id m123mr5695367wme.88.1494009265876; Fri, 05 May 2017 11:34:25 -0700 (PDT) Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-614c-1dd1-081c-2c1d.holly.idiocy.org. [2001:8b0:3f8:8129:614c:1dd1:81c:2c1d]) by smtp.gmail.com with ESMTPSA id 7sm2350898wmv.17.2017.05.05.11.34.24 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 May 2017 11:34:25 -0700 (PDT) Date: Fri, 05 May 2017 19:34:21 +0100 Message-Id: To: control@debbugs.gnu.org From: Alan Third Subject: control message for bug #25818 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 25818 fixed close 25818 26.1 From unknown Wed Jun 18 00:28:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 03 Jun 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator