summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2021-04-04 09:41:44 +0300
committerEli Zaretskii <eliz@gnu.org>2021-04-04 09:41:44 +0300
commit69158a19956656c52208cbe8c11134eeed8ca867 (patch)
treeef7638a7dde9c3802bf84d5340aca55c152001f8 /src/frame.c
parent55c768f3ea7da76328641c2db9aa922564b0a1f3 (diff)
downloademacs-69158a19956656c52208cbe8c11134eeed8ca867.tar.gz
emacs-69158a19956656c52208cbe8c11134eeed8ca867.tar.bz2
emacs-69158a19956656c52208cbe8c11134eeed8ca867.zip
Fix recent changes regarding frame-scale-factor
* src/frame.c (Fframe_scale_factor): Make more robust and avoid compiler warning while at that. Doc fix.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frame.c b/src/frame.c
index 784a079bffe..bbdc3b55992 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3747,13 +3747,13 @@ window state change flag is reset. */)
DEFUN ("frame-scale-factor", Fframe_scale_factor, Sframe_scale_factor,
0, 1, 0,
doc: /* Return FRAMEs scale factor.
-The scale factor is the amount a logical pixel size must be multiplied
-to find the real number of pixels. */)
+The scale factor is the amount by which a logical pixel size must be
+multiplied to find the real number of pixels. */)
(Lisp_Object frame)
{
struct frame *f = decode_live_frame (frame);
- return (make_float (FRAME_SCALE_FACTOR (f)));
+ return (make_float (f ? FRAME_SCALE_FACTOR (f) : 1));
}
/***********************************************************************