Newsgroups: comp.windows.x
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!csn!stan!marvin!toml
From: toml@marvin.Solbourne.COM (Tom LaStrange)
Subject: Re: QueryPointer in tvtwm
In-Reply-To: wrt@steve.cray.com's message of 24 Apr 91 15:02:48 GMT
Message-ID: <TOML.91Apr26090946@marvin.Solbourne.COM>
Sender: toml@Solbourne.COM (Tom LaStrange)
Organization: Solbourne Computer, Inc.
References: <093438.27007@timbuk.cray.com>
Date: 26 Apr 91 09:09:46

|>      How do I get the pointer location when using tvtwm?
|> 
|>      Currently I do:
|> 	  XQueryPointer(XtDisplay(topLevel),
|> 		RootWindowOfScreen(XtScreen(topLevel)),
|> 		&root,
|> 		&child,
|> 		&rootx, &rooty,
|> 		&winx, &winy,
|> 		&keys_buttons);
|> 
|>      This returns the (rootx,rooty) as absolute window numbers and not
|> 	the location offset where the user really is in the virtual root space.

You then need to do an XTranslateCoordinates using the virtual root window id.
See the ssetroot client or get a copy of vroot.h for examples on how to
get the virtual root window.

--
(I kid you not)Tom LaStrange        toml@Solbourne.COM
