[comp.windows.x] DisplayHeightMM/Xqvss

rauletta@gmu90x.gmu.edu (rauletta) (02/03/90)

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

evans@testmax.ZK3.DEC.COM (Marc Evans Ultrix Q/A) (02/05/90)

Path: testmax!evans
Newsgroups: comp.windows.x
Distribution: na
References: <2550@gmu90x.gmu.edu> 
From: evans@testmax.ZK3.DEC.COM (Marc Evans Ultrix Q/A)
Reply-To: evans@decvax.DEC.COM
Organization: Synergytics
Subject: Re: DisplayHeightMM/Xqvss
Keywords: Xqvss R4 Server returns incorrect Display Height??

In article <2550@gmu90x.gmu.edu>, rauletta@gmu90x.gmu.edu (rauletta) writes:
> 
> Abstract: Xqvss R4 server (cc & gcc) returns incorrect display size
> in millimeters.
> 
> The result when a new note is opened is the following:
> 
> hpixel 864 wpixel 1024 hmm 10972 wmm 13004 hpi 2 wpi 2
> 
> Any suggestions? Where do I look in the server?
> The code works correctly against the R3 server.
> 
From what I can tell, the problem is someplace in ddx/dec/qvss/qvss_io.c
and/or ddx/mfb/mfbscrinit.c. The function mfbScreenInit is called from the
function qvssScreenInit. This particular code happens to be surrounded by
some #ifdefs, which if not properly defined may be causing the problem. I
suggest that you look closely at qvss_io.c around line 360 to determine if
you are compiling with the necessary configuration parameters.
==========================================================================
Marc Evans - WB1GRH - evans@decvax.DEC.COM  | Synergytics    (603)893-8481
     Unix/X-window Software Contractor      | 3 Koper Ln, Pelham, NH 03076
==========================================================================