Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!brutus.cs.uiuc.edu!psuvax1!rutgers!pyrnj!pyrdc!gmu90x!rauletta From: rauletta@gmu90x.gmu.edu (rauletta) Newsgroups: comp.windows.x Subject: DisplayHeightMM/Xqvss Keywords: Xqvss R4 Server returns incorrect Display Height?? Message-ID: <2550@gmu90x.gmu.edu> Date: 2 Feb 90 16:59:49 GMT Distribution: na Organization: George Mason Univ., Fairfax Va. Lines: 38 Abstract: Xqvss R4 server (cc & gcc) returns incorrect display size in millimeters. The following code (from the xpostit function CreateNewNote) returns an incorrect display width and height in millimeters when run against a Xqvss R4 server. --- hpixel = DisplayHeight(display, DefaultScreen(display)); wpixel = DisplayWidth(display, DefaultScreen(display)); hmm = DisplayHeightMM(display, DefaultScreen(display)); wmm = DisplayWidthMM(display, DefaultScreen(display)); /*hmm = 280; wmm = 320;*/ hpi = (int) ((25.4 * hpixel) / (float) hmm + 0.5); wpi = (int) ((25.4 * wpixel) / (float) wmm + 0.5); printf("hpixel %d wpixel %d hmm %d wmm %d hpi %d wpi %d\n", hpixel,wpixel,hmm,wmm,hpi,wpi); ----- The result when a new note is opened is the following: hpixel 864 wpixel 1024 hmm 10972 wmm 13004 hpi 2 wpi 2 ^^^^^^^^^ ^^^^^^^^^ My display does not even come close to 10 by 20 meters?:-) :-( Any suggestions? Where do I look in the server? The code works correctly against the R3 server. Rich Auletta rauletta@gmuvax2.gmu.edu (System: Ultrix 3.1/Vax Xqvss/VS 2000 everything currently built using cc, mit fix 1 applied. gcc shows same problem.)