Mercurial > emacs
changeset 65030:a093a1e65b71
(calc_pixel_width_or_height): Use actual display
resolution when available instead of Vdisplay_pixels_per_inch.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Thu, 18 Aug 2005 11:31:22 +0000 |
parents | ea44aa20fb19 |
children | 177b0fcf58b9 |
files | src/xdisp.c |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Thu Aug 18 11:31:04 2005 +0000 +++ b/src/xdisp.c Thu Aug 18 11:31:22 2005 +0000 @@ -17622,6 +17622,15 @@ if (pixels > 0) { double ppi; +#ifdef HAVE_WINDOW_SYSTEM + if (FRAME_WINDOW_P (it->f) + && (ppi = (width_p + ? FRAME_X_DISPLAY_INFO (it->f)->resx + : FRAME_X_DISPLAY_INFO (it->f)->resy), + ppi > 0)) + return OK_PIXELS (ppi / pixels); +#endif + if ((ppi = NUMVAL (Vdisplay_pixels_per_inch), ppi > 0) || (CONSP (Vdisplay_pixels_per_inch) && (ppi = (width_p @@ -23056,7 +23065,7 @@ scroll_margin = 0; DEFVAR_LISP ("display-pixels-per-inch", &Vdisplay_pixels_per_inch, - doc: /* Pixels per inch on current display. + doc: /* Pixels per inch value for non-window system displays. Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */); Vdisplay_pixels_per_inch = make_float (72.0);