[comp.windows.x] DisplayHeightMM accuracy?

daven@maxine.wpi (Dave Nedde) (05/15/91)

I tried using the DisplayHeightMM macro to get the height and width of
my screen and the results were:
  Sun spacrstation with a mono screen was an inch too large
  Sun 4 with a color screen was an inch too short
  DecStation 3100 with a color screen was just right

  What is the use of having this macro if the results aren't valid?

Here is the code snippet I used to get the screen width:
---
#define MM_PER_INCH 25.4
  
 printf("Screen is %d pixels high, %d mm, and %lg inches high\n",
	DisplayHeight(XtDisplay(w),DefaultScreen(XtDisplay(w))),
	DisplayHeightMM(XtDisplay(w),DefaultScreen(XtDisplay(w))),
	DisplayHeightMM(XtDisplay(w),DefaultScreen(XtDisplay(w)))/MM_PER_INCH);
---

  -DaveN
--
:^| HAVE A DAY.				David Nedde
daven@{maxine|wpi}.wpi.edu		CS Dept. WPI Worcester, MA 01609

jg@crl.dec.com (Jim Gettys) (05/15/91)

All I can say is to grumble at Sun.  As you noted, we've tried to get things
right on our machines.  Note, however, you may have to inform the server at
start up what kind of display/monitor you have to get the right information
through the system; it is generally impossible in hardware to find out what
monitor you have plugged into a display.
				- Jim Gettys