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>, 30141@debbugs.gnu.org
Subject: bug#30141: (26.0.91; text-pixel dimensions not properly saved by desktop-save-mode sometimes)
Date: Sat, 20 Jan 2018 11:35:09 +0100	[thread overview]
Message-ID: <5A631B5D.2090604@gmx.at> (raw)
In-Reply-To: <CAHyO48ybBYsYHar-C=3=SS7Y7Et0GWrkGpWG3k4u==Pnmg2GiQ@mail.gmail.com>

 > The issue is when you have the frame sized to be a
 > non-multiple of the font-width (pixel sized), save the desktop, then
 > restart emacs and restore the desktop.
 >
 > At this point you’ll have a pixel width in your frame parameters.
 >
 > Then if you resize the frame to be a multiple of the font-width and
 > save the desktop, you end up writing the previous pixel widths because
 > they were in frame parameters and we do not reset them unless you are
 > using a non-multiple of the font width.
 >
 > If that doesn’t make sense I can try and write up a repro when I get a chance.

Thanks, I understand now.  I'm afraid it's the implementation that
doesn't make sense but your patch does and should be applied.  I'm not
sure whether we still can do that on the release branch.  Eli?

Eventually, we should fix this in a more profound way, though I don't
know yet how.  When I wrote the code to allow pixelwise resizing of
frames, one major aim was to not interfere with existing behavior.  I
decided to use a global variable (`frame-resize-pixelwise') which was
intended for interfacing with the window manager: When nil, Emacs
should continue to work as before, when non-nil, the new pixelwise
behavior would be allowed to take over.

Mixing the two was not intended (at that time frameset.el didn't exist
yet).  Neither were pixel values for the 'width' and 'height' frame
parameters - 'text-pixels' was added later.  Whether an individual
frame would be resized pixelwise was decided by the PIXELWISE argument
of functions like `set-frame-size'.  And to make sure the latter would
succeed, on some systems making `frame-resize-pixelwise' non-nil was a
prerequisite.

This idea breaks when pixelwise and non-pixelwise behavior are mixed
in one and the same session either for one and the same frame or for
different frames.  It might be possible to fix that by adding a
'resize-pixelwise' frame parameter to override the global variable's
value.

But what's really needed are two different parameters for width and
height: One for the value that has been asked for by the user (to be
specified the way it is now now) and one for the value realized by the
windowing system (a simple pixel value).  Unfortunately, I have no
good idea how to keep these two apart.  Maybe we need three parameters
- the old 'width' say, a 'requested-width' and a 'realized-width'.
Which might be still insufficient - what would the 'realized-width' of
a maximized or fullscreen frame be?

martin






  reply	other threads:[~2018-01-20 10:35 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17  1:24 bug#30141: 26.0.91; text-pixel dimensions not properly saved by desktop-save-mode sometimes Aaron Jensen
2018-01-17  5:43 ` bug#30141: (26.0.91; text-pixel dimensions not properly saved by desktop-save-mode sometimes) Aaron Jensen
2018-01-17  8:49   ` Robert Pluim
2018-01-17 11:45     ` Aaron Jensen
2018-01-17  9:12   ` martin rudalics
2018-01-17 11:50     ` Aaron Jensen
2018-01-17 11:59       ` Aaron Jensen
2018-01-19 18:55       ` martin rudalics
2018-01-19 19:00         ` Aaron Jensen
2018-01-20 10:35           ` martin rudalics [this message]
2018-01-20 10:50             ` Eli Zaretskii
2018-01-20 14:07               ` martin rudalics
2018-01-20 14:33                 ` Eli Zaretskii
2018-01-22  9:54                   ` martin rudalics
2018-02-13 10:23                     ` martin rudalics
2018-03-12 22:18           ` Aaron Jensen
2018-03-13  7:26             ` martin rudalics
2018-03-13 15:32               ` Aaron Jensen
2018-03-14  8:14                 ` martin rudalics
2018-03-14 14:59                   ` Aaron Jensen
2018-03-14 15:15                     ` Aaron Jensen
2018-03-14 20:05                       ` martin rudalics
2018-03-14 20:12                         ` Aaron Jensen
2018-03-15  8:20                           ` martin rudalics
2018-03-15 15:24                             ` Aaron Jensen
2018-03-17 10:05                               ` martin rudalics
2018-03-17 10:11                                 ` Noam Postavsky
2018-03-17 11:08                                   ` martin rudalics
2018-03-17 11:16                                     ` Eli Zaretskii
2018-03-17 11:28                                       ` martin rudalics
2018-03-17 16:32                                 ` Aaron Jensen
2018-01-17  9:12 ` bug#30141: 26.0.91; text-pixel dimensions not properly saved by desktop-save-mode sometimes martin rudalics

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=5A631B5D.2090604@gmx.at \
    --to=rudalics@gmx.at \
    --cc=30141@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    /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.