[comp.windows.x] tvtwm and -geometry -0-0

scl@sasha.acc.Virginia.EDU (Steve Losen) (09/10/90)

I have noticed that tvtwm places a window in an unexpected place when
using the geometry spec "-0-0", for example.  The window is always placed
in the lower right corner of the "home" position of the viewer.  This
happens regardless of the virtual desktop size and the actual position of
the viewer.  I suspect that "-0-0" is being offset from the physical size
of the display rather than the size of the virtual desktop.

By the time that tvtwm gets the geometry spec, has the "-0-0" already been
translated to the actual coordinates or does tvtwm itself interpret
"-0-0"?  If the latter, I suspect this is a bug in tvtwm.  I would expect
"-0-0" to place the window in the lower right corner of the virtual
desktop.

Is the only solution to always use "positive" geometry specs or can this
be fixed in tvtwm?  I'm at patchlevel 2.

--
Steve Losen                     scl@virginia.edu

University of Virginia Academic Computing Center

toml@ninja.Solbourne.COM (Tom LaStrange) (09/11/90)

|> I have noticed that tvtwm places a window in an unexpected place when
|> using the geometry spec "-0-0", for example.  The window is always placed
|> in the lower right corner of the "home" position of the viewer.  This
|> happens regardless of the virtual desktop size and the actual position of
|> the viewer.  I suspect that "-0-0" is being offset from the physical size
|> of the display rather than the size of the virtual desktop.
|> 
|> By the time that tvtwm gets the geometry spec, has the "-0-0" already been
|> translated to the actual coordinates or does tvtwm itself interpret
|> "-0-0"?  If the latter, I suspect this is a bug in tvtwm.  I would expect
|> "-0-0" to place the window in the lower right corner of the virtual
|> desktop.

You got it.  By the time the window manager gets it, the coordinates have
been converted into positive coordinates.  There are however, some hints
also given to the window manager about which corner/side the coordinates
were specified relative to.  These hints will only show up in R4 clients.
Also, the fact that you specified a geometry means that USPosition hints
are also going to be set (assuming an Xt based client) which tvtwm takes
to mean place the window at this absolute pixel location.  I'm not sure I 
want to get into trying to figure out what a user migh have wanted.

--
Tom LaStrange

Solbourne Computer Inc.    ARPA: toml@Solbourne.COM
1900 Pike Rd.              UUCP: ...!{boulder,sun}!stan!toml
Longmont, CO  80501

dme@doc.ic.ac.uk (Dave Edmondson) (09/11/90)

In article <1990Sep10.103722@sasha.acc.Virginia.EDU> scl@sasha.acc.Virginia.EDU (Steve Losen) writes:
scl> I have noticed that tvtwm places a window in an unexpected place when
scl> using the geometry spec "-0-0", for example.  The window is always placed
scl> in the lower right corner of the "home" position of the viewer.  This
scl> happens regardless of the virtual desktop size and the actual position of
scl> the viewer.  I suspect that "-0-0" is being offset from the physical size
scl> of the display rather than the size of the virtual desktop.
it is.

scl> By the time that tvtwm gets the geometry spec, has the "-0-0" already been
scl> translated to the actual coordinates or does tvtwm itself interpret
scl> "-0-0"?  If the latter, I suspect this is a bug in tvtwm.  I would expect
scl> "-0-0" to place the window in the lower right corner of the virtual
scl> desktop.
the application is responsible for parsing negative geometry parts.
generally the application will do:
	realy = display_width + geomy
when geomy is negative.  if the responsiblity for parsing negative
geometries is moved _out_ of the application and into the window
manager (which would seem to be a reasonable idea) then the server
would also need to be taught to do negative geometries for occasions
where no window manager is being used.

scl> Is the only solution to always use "positive" geometry specs or can this
scl> be fixed in tvtwm?  I'm at patchlevel 2.
I don't think that it can be fixed.  vtwm has the same problem.  from
reading toml's paper in the last usenix i gather that swm uses the
swmhints program to get around this.

scl> Steve Losen                     scl@virginia.edu
dave.
--
                            Dave Edmondson
Department of Computing, Imperial College, 180 Queen's Gate, London SW7 1BZ UK
               phone: 071-589-5111 x5085 fax: 071-581-8024
        dme@doc.ic.ac.uk, ..!ukc!icdoc!dme, dme@athena.mit.edu