* bug#28915: Emacs 27 under macOS window system; improper frame resizing (off by 4 pixels)
@ 2017-10-20 17:41 Bob Weiner
2017-10-21 8:05 ` martin rudalics
2017-10-21 8:16 ` martin rudalics
0 siblings, 2 replies; 4+ messages in thread
From: Bob Weiner @ 2017-10-20 17:41 UTC (permalink / raw
To: 28915
Each time the following two expressions are called, they increase the
width or height respectively of the selected frame by 4 pixels rather
than leaving the dimension unchanged. Even if this is a rounding error
due to use of column/line math, shouldn't there be a special case test
for this that prevents the size change? It would simplify coding.
(progn (set-frame-width nil (frame-pixel-width) nil t)
(frame-pixel-width))
(progn (set-frame-height nil (frame-pixel-height) nil t)
(frame-pixel-height))
Bob
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#28915: Emacs 27 under macOS window system; improper frame resizing (off by 4 pixels)
2017-10-20 17:41 bug#28915: Emacs 27 under macOS window system; improper frame resizing (off by 4 pixels) Bob Weiner
@ 2017-10-21 8:05 ` martin rudalics
2017-10-31 8:42 ` martin rudalics
2017-10-21 8:16 ` martin rudalics
1 sibling, 1 reply; 4+ messages in thread
From: martin rudalics @ 2017-10-21 8:05 UTC (permalink / raw
To: Bob Weiner, 28915
> Each time the following two expressions are called, they increase the
> width or height respectively of the selected frame by 4 pixels rather
> than leaving the dimension unchanged. Even if this is a rounding error
> due to use of column/line math, shouldn't there be a special case test
> for this that prevents the size change? It would simplify coding.
>
> (progn (set-frame-width nil (frame-pixel-width) nil t)
> (frame-pixel-width))
>
> (progn (set-frame-height nil (frame-pixel-height) nil t)
> (frame-pixel-height))
This is not a bug. For historic reasons, the second arguments of
‘set-frame-width’ and ‘set-frame-height’ must specify the width and
height of the _text area_ of the frame and not its native width and
height. You can rely on this to never ever change. Section 29.3.4
Frame Size of the Elisp manual should explain everything.
martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#28915: Emacs 27 under macOS window system; improper frame resizing (off by 4 pixels)
2017-10-20 17:41 bug#28915: Emacs 27 under macOS window system; improper frame resizing (off by 4 pixels) Bob Weiner
2017-10-21 8:05 ` martin rudalics
@ 2017-10-21 8:16 ` martin rudalics
1 sibling, 0 replies; 4+ messages in thread
From: martin rudalics @ 2017-10-21 8:16 UTC (permalink / raw
To: Bob Weiner, 28915
I forgot to present the necessary code adjustments for this. Use
(setq frame-resize-pixelwise t)
(progn (set-frame-width nil (frame-text-width) nil t)
(frame-native-width))
(progn (set-frame-height nil (frame-text-height) nil t)
(frame-native-height))
martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#28915: Emacs 27 under macOS window system; improper frame resizing (off by 4 pixels)
2017-10-21 8:05 ` martin rudalics
@ 2017-10-31 8:42 ` martin rudalics
0 siblings, 0 replies; 4+ messages in thread
From: martin rudalics @ 2017-10-31 8:42 UTC (permalink / raw
To: Bob Weiner, 28915-done
> This is not a bug. For historic reasons, the second arguments of
> ‘set-frame-width’ and ‘set-frame-height’ must specify the width and
> height of the _text area_ of the frame and not its native width and
> height. You can rely on this to never ever change. Section 29.3.4
> Frame Size of the Elisp manual should explain everything.
Closing this bug.
martin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-31 8:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-20 17:41 bug#28915: Emacs 27 under macOS window system; improper frame resizing (off by 4 pixels) Bob Weiner
2017-10-21 8:05 ` martin rudalics
2017-10-31 8:42 ` martin rudalics
2017-10-21 8:16 ` martin rudalics
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).