[comp.windows.x] X Resource Database

hallamw@ceres.Berkeley.EDU (William J Hallam) (06/06/90)

I am experiencing a problem with specifying geometry for 
X clients through xrdb.  Whatever geometry I specify for the
initial application shell is also used for every other 
window which that application uses subsequently.

Is there any way (besides specifying geometry for each
specific window) to prevent this from happening?

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (06/06/90)

> I am experiencing a problem with specifying geometry for 
> X clients through xrdb.  Whatever geometry I specify for the
> initial application shell is also used for every other 
> window which that application uses subsequently.

It sounds like you are confused about how the resource matching is done.

If you specify the geometry resource as:

foo*geometry:		80x24+0+0

then it will match every shell widget in the application.  If, however, you use
the more specific notation

foo.geometry:		80x24+0+0

you will only match the topmost shell of the application.  There are
applications who have widget heirachies that do not follow this rule, so it is
best to consult the documention of each application to be sure of the right
results.

It sounds like you need to spend some time getting to know a bit more about the
resource manager.  Some suggested reading:

Scheifler, Gettys, and Newman, "X Window System, C Library and Protocol
Reference"  Section 10.11, [doc/Xlib or hardcopy/Xlib]

Fulton, "Using and Specifying X Resources",  [doc/tutorials/resources.txt]

Peterson, "Athena Widget Set - C Language Interface", Section 2.9.2,
[doc/Xaw or hardcopy/Xaw]

The directories contained in square brackets ([]) are locations of these
documents on the MIT X11R4 distribution.


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213

mikey@eukanuba.wpd.sgi.com (Mike Yang) (06/07/90)

In article <8238@crdgw1.crd.ge.com>, hallamw@ceres.Berkeley.EDU (William
J Hallam) writes:
|> I am experiencing a problem with specifying geometry for 
|> X clients through xrdb.  Whatever geometry I specify for the
|> initial application shell is also used for every other 
|> window which that application uses subsequently.

Be careful how you specify the geometry resource.  If you use a '*'
instead of a '.', your geometry specification will apply to all
children widgets as well.

For instance,

	XRn.geometry:			580x680+460+50

is correct while

	XRn*geometry:			580x680+460+50

is probably not.

----------------------------------------------------------------------
   Mike Yang        Silicon Graphics, Inc.        mikey@wpd.sgi.com
		    415/335-1786		  decwrl!sgi!wpd!mikey

mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) (06/07/90)

> I am experiencing a problem with specifying geometry for X clients
> through xrdb.  Whatever geometry I specify for the initial
> application shell is also used for every other window which that
> application uses subsequently.

Let me guess - you're specifying something like

application*geometry: ....

in the resource database, right?

That's your problem.  That resource spec also matches a query for
application.widget1.subwidget1.commandbox.exitbutton.geometry

Guess what that means.

Moral: be very careful when using *s in resources.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu