Mercurial > emacs
changeset 57144:1b899494bbe2
(x_term_init): Work around a bug in some X servers.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 18 Sep 2004 21:36:02 +0000 |
parents | b628e08b0230 |
children | 26c822f42ae4 |
files | src/ChangeLog src/xterm.c |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat Sep 18 21:33:44 2004 +0000 +++ b/src/ChangeLog Sat Sep 18 21:36:02 2004 +0000 @@ -1,3 +1,7 @@ +2004-09-18 Stefan Monnier <monnier@iro.umontreal.ca> + + * xterm.c (x_term_init): Work around a bug in some X servers. + 2004-09-18 Richard M. Stallman <rms@gnu.org> * buffer.c (syms_of_buffer) <default-major-mode>: Doc fix.
--- a/src/xterm.c Sat Sep 18 21:33:44 2004 +0000 +++ b/src/xterm.c Sat Sep 18 21:36:02 2004 +0000 @@ -10432,10 +10432,12 @@ int screen_number = XScreenNumberOfScreen (dpyinfo->screen); double pixels = DisplayHeight (dpyinfo->display, screen_number); double mm = DisplayHeightMM (dpyinfo->display, screen_number); - dpyinfo->resy = pixels * 25.4 / mm; + /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */ + dpyinfo->resy = (mm < 1) ? 100 : pixels * 25.4 / mm; pixels = DisplayWidth (dpyinfo->display, screen_number); + /* Mac OS X 10.3's Xserver sometimes reports 0.0mm. */ mm = DisplayWidthMM (dpyinfo->display, screen_number); - dpyinfo->resx = pixels * 25.4 / mm; + dpyinfo->resx = (mm < 1) ? 100 : pixels * 25.4 / mm; } dpyinfo->Xatom_wm_protocols