(x_term_init): Work around a bug in some X servers.

This commit is contained in:
Stefan Monnier 2004-09-18 21:36:02 +00:00
parent 0f4a15f89c
commit 2c51754c78
2 changed files with 8 additions and 2 deletions

View file

@ -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.

View file

@ -10432,10 +10432,12 @@ x_term_init (display_name, xrm_option, resource_name)
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