[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to move a window



I need a little help.  We are trying to move a window from inside an
application, and can't quite understand how some CLX functions are supposed
to work.

For a top-level window, if we call
	(xlib:drawable-y mydraw)
it returns a number relative to the special window that the window manager
created (i.e., twm reparents the windows to put the borders around the windows).
This function always returns 19 no matter where the window is placed.  
However, if I 
	(setf (xlib:drawable-y mydraw) 200)
it does set the y position of the OUTER window to 198 (why not 200?).  I know
the number because the configure-notify comes back with 198.  The border-width
is 2, but the top of the outer window has the conventional twm title line.
The CLX manual clearly says that the value passed to drawable-y will be the
OUTSIDE of the border.

>From the ICCCM, I got the impression that the right way to change a window's
position was using the wm-normal-hints, but this didn't seem to affect the
window at all.

So, my questions are:

* What is the right way in CLX to set the position of a top-level window?

* Is there a bug in CLX or TWM that is causing the numbers to be off by 2?

Thanks for your help!
Brad A. Myers
School of Computer Science
Carnegie Mellon University
Pittsburgh, PA  15213-3890
(412) 268-5150
bam@a.gp.cs.cmu.edu