all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Aaron Jensen <aaronjensen@gmail.com>, Alan Third <alan@idiocy.org>
Cc: 28442@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	[thread overview]
Message-ID: <5A1A96A4.5000509@gmx.at> (raw)
In-Reply-To: <CAHyO48zmur58sBSOQd0V4ittgbU7FZRyPbKNDj=CKrk5VapDdQ@mail.gmail.com>

 >> 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






  reply	other threads:[~2017-11-26 10:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 11:06 bug#28442: 26.0.50; desktop-save-mode no longer restores correct frame size on macOS Aaron Jensen
2017-09-13 11:22 ` Aaron Jensen
2017-11-22 17:07 ` Alan Third
2017-11-22 17:15   ` Aaron Jensen
2017-11-22 20:31     ` Alan Third
2017-11-23  7:46   ` martin rudalics
2017-11-23 20:41     ` Alan Third
2017-11-23 22:20       ` Aaron Jensen
2017-11-24  9:01         ` martin rudalics
2017-11-24 16:33           ` Aaron Jensen
2017-11-26 10:25             ` martin rudalics [this message]
2017-11-26 18:47               ` bug#28442: 26.0.50; [PATCH] Save and restore frame pixel size with desktop-save-mode Aaron Jensen
2017-11-26 22:15                 ` Aaron Jensen
2017-11-27  3:34                   ` Eli Zaretskii
2017-11-27  8:48                 ` martin rudalics
2017-11-27 16:52                   ` Aaron Jensen
2017-12-15 15:30                     ` Aaron Jensen
2017-12-15 18:16                       ` martin rudalics
2017-12-15 20:35                         ` Eli Zaretskii
2017-12-16  9:41                           ` martin rudalics
2017-12-16 16:21                             ` Aaron Jensen
2017-12-16 17:30                               ` martin rudalics
2017-12-16 17:39                               ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A1A96A4.5000509@gmx.at \
    --to=rudalics@gmx.at \
    --cc=28442@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    --cc=alan@idiocy.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.