GNU bug report logs - #28442
26.0.50; desktop-save-mode no longer restores correct frame size on macOS

Previous Next

Package: emacs;

Reported by: Aaron Jensen <aaronjensen <at> gmail.com>

Date: Wed, 13 Sep 2017 11:07:01 UTC

Severity: normal

Found in version 26.0.50

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Aaron Jensen <aaronjensen <at> gmail.com>, Alan Third <alan <at> idiocy.org>
Cc: 28442 <at> debbugs.gnu.org
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
>> We'd probably need to save and restore two additional frame parameters
>> like 'text-pixel-width' and 'text-pixel-height' then.
>
> That’d 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 creating
      ;; invisible "fullscreen" frames of default size and then maximizing them
      ;; (and making them visible) which at least is somewhat user-friendly
      ;; 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





This bug report was last modified 7 years and 219 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.