From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#28442: 26.0.50; desktop-save-mode no longer restores correct frame size on macOS Date: Sun, 26 Nov 2017 11:25:40 +0100 Message-ID: <5A1A96A4.5000509@gmx.at> References: <5A167CC1.5090609@gmx.at> <20171123204114.GA3884@breton.holly.idiocy.org> <5A17DFE6.5000005@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1511692041 10315 195.159.176.226 (26 Nov 2017 10:27:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 26 Nov 2017 10:27:21 +0000 (UTC) Cc: 28442@debbugs.gnu.org To: Aaron Jensen , Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 26 11:27:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIu9X-00023B-Uu for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Nov 2017 11:27:12 +0100 Original-Received: from localhost ([::1]:56073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIu9f-00051e-CL for geb-bug-gnu-emacs@m.gmane.org; Sun, 26 Nov 2017 05:27:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIu9T-0004xV-KL for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 05:27:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIu9O-00010y-N9 for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 05:27:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49881) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eIu9O-00010u-Jw for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 05:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eIu9O-0008VG-8a for bug-gnu-emacs@gnu.org; Sun, 26 Nov 2017 05:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Nov 2017 10:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28442 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28442-submit@debbugs.gnu.org id=B28442.151169196432616 (code B ref 28442); Sun, 26 Nov 2017 10:27:02 +0000 Original-Received: (at 28442) by debbugs.gnu.org; 26 Nov 2017 10:26:04 +0000 Original-Received: from localhost ([127.0.0.1]:58562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIu8S-0008Tz-FG for submit@debbugs.gnu.org; Sun, 26 Nov 2017 05:26:04 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:61016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eIu8Q-0008TV-QS for 28442@debbugs.gnu.org; Sun, 26 Nov 2017 05:26:03 -0500 Original-Received: from [192.168.1.100] ([46.125.250.72]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LoEwL-1eldFA1a8X-00gLAI; Sun, 26 Nov 2017 11:25:45 +0100 In-Reply-To: X-Provags-ID: V03:K0:XAZFg8SRfjDvABDDGponhmEZ0+5XSKk2g7Ks2SrFcKrfUppOCMG Csp8cpc86D9K2C8GaId+HSaREZrFNWcifOk36wcRlZu0KkOw7cl32PVt94SCknLan6ADgdx 6WKJLP62Lp7I7/VkIEbyRL0VDZppnD1xkiBzIAAKSaDzpGkIelipGd7bhCa+woQsBQMdpB0 DhZijaxhUeeh/RrBzMPOw== X-UI-Out-Filterresults: notjunk:1;V01:K0:7kyoOyaW9fk=:HBnpBSqkeEojBuubNsK1WO jWl1C/luuDQG6rJLLU+wV839BPsBLJw37RUG0c/K4PvBK82r6RGQF+hA1z/TSVPdiC0Fng/CR y8zApFn7xtMnELijz23vS5KJctKVlJacJ2HDI3u8SB4Ubtp/1f9a8pHMwpkRKtBaI8YMR9OPt X3YyGMZwGNNPdlpCoeQH7HRuBX/TI238K6FvUKjdjesbutE+Yd8TY+oOjo9nUZNgh1zZTnBFL LFBFWooeR0NpEgTFEB7yW273dB7owOi/5NI1P2U7FZlsr+OsjM/2iIuzti7FFybJIb7y8A7C8 bp/zVPP47EH/06CAG7u86l7MrRJuKKqRZTbWsW0EuN0dOJn9ew+3bW0Nnp3virVMAMginAiRz HBpYrgSTm9YmuB/qD1z7kD+xAKnNyHVFvtUhjqGpUyf2zpNJPw5uQrvpn14abtxd45itkW4jN cQrPzWKR1MMIW4n0AgTZ+q1144wCTe8ZbHupJvvPWoX7G1jWgFohjGG8iaqnQpSD27tX/YzKr mZlzu8DWabk55/bDQBY02fn2bostBeZTl4OsIQdqEmvYlLVXk0c/BAGsXjD0+/DZD2PQasVKQ 5WoxV+e/7QGEev+WcVnLX7rxUPvHwMbpRAcMwEk3cd50XZdCFLqhRbLL0+s8fv945yFOCoJJA GHCRxk1zzOetU30R3wI43Ec08loUtlergQQSrm94vFeuwGZvtLbuf4LA/dMpYUCBxSRyciE16 mdKFX4bLkIJ7hr10rFZisIu0Rx7FcFycgCAByVzOQZgOzoSHYffzM+k8hR8C/1iducnckvQl X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140403 Archived-At: >> We'd probably need to save and restore two additional frame parameter= s >> like 'text-pixel-width' and 'text-pixel-height' then. > > That=E2=80=99d be great. It would be nice if you could try to do that: First of all you would have to look at how and why frameset.el ignores the pixel size of frames. I suspect it does that by going for the normal 'width' and 'height' parameters instead when saving and restoring frames. So if the pixel width of a frame differs from what its width times `frame-char-width' of that frame tells, you would have to add a separate 'text-pixel-width' parameter in `frameset--record-relationships' and have `frameset--restore-frame' use the value of that parameter instead of (or maybe after) processing the normal 'width' parameter. I'd try to not always use 'text-pixel-width' instead of 'width' because otherwise we might deceive more conservative users. There's one tricky case mentioned by this comment in frameset.el: ;; Currently Emacs has the limitation that it does not record the = size ;; and position of a frame before maximizing it, so we cannot save= & ;; restore that info. Instead, when restoring, we resort to creat= ing ;; invisible "fullscreen" frames of default size and then maximizi= ng them ;; (and making them visible) which at least is somewhat user-frien= dly ;; when these frames are later de-maximized. so I would also propose to not save a 'text-pixel-width' parameter when a frame is maximized or fullscreen. I intend to resolve that latter issue eventually by storing some sort of normal width in the frame structure (which would likely be some pixel width) but am not yet sure how to do that. martin