T.R | Title | User | Personal Name | Date | Lines |
---|
2734.1 | XTranslateCoordinates | DECWIN::KLEIN | | Wed May 09 1990 10:52 | 21 |
| This was just discussed yesterday in one of the notes files, but I don't
remember which one.
Use XTranslateCoordinates, something like:
static void WhereAreWe(w, xP, yP)
Widget w;
int *xP, *yP;
{
Window tmpchild;
XTranslateCoordinates (XtDisplay (w), XtWindow (w),
RootWindowOfScreen (XtScreen (w)),
-w->core.border_width, -w->core.border_width, xP, yP, &tmpchild);
}
-steve-
|
2734.2 | how do I know how high window manager decorations are though ? | HANNAH::OSMAN | see HANNAH::IGLOO$:[OSMAN]ERIC.VT240 | Wed May 09 1990 14:34 | 23 |
|
First of all XTRanslateCoordinates seems not to be in the index of
the purple book
XWINDOW SYSTEM
by Robert Scheifler and James Gettys.
Is it in the book somewhere and just not indexed ?
However, I have now used XTranslateCoordinates, but for now I have an
assumption that the window manager decoration at the top is 20 pixels
high.
How can I avoid making that assumption ?
The only thing I could think of was to temporarily put my window at
(0,0), do the XTranslateCoordinates, and use the resultant y value as
the height of the window manager decoration !
Is this a good way to do it ?
/Eric
|
2734.3 | its in there ! | GSRC::WEST | Help stamp out and abolish redundancy ! | Wed May 09 1990 16:24 | 28 |
| RE: <<< Note 2734.2 by HANNAH::OSMAN "see HANNAH::IGLOO$:[OSMAN]ERIC.VT240" >>>
-< how do I know how high window manager decorations are though ? >-
>> Is it in the book somewhere and just not indexed ?
Yes, me thinks its a boo boo. Section 3.10 Page 60. It _is_ indexed under
TranslateCoordinates (page 683)...good misdirection.
>> However, I have now used XTranslateCoordinates, but for now I have an
>> assumption that the window manager decoration at the top is 20 pixels
>> high.
Good assumption...I think that's the correct value.
>> How can I avoid making that assumption ?
By having the group/person who wrote the code for the frame window tell
you exactly what dimensions they used. :^)
>> The only thing I could think of was to temporarily put my window at
>> (0,0), do the XTranslateCoordinates, and use the resultant y value as
>> the height of the window manager decoration !
plus one...right?
-=> Jim <=-
|
2734.4 | | KONING::KONING | NI1D @FN42eq | Wed May 16 1990 14:52 | 6 |
| Assuming any particular decoration size sounds like a BAD idea, since you
can't know which window manager is being used -- and, therefore, what size
decoration. Just because some of them use 20 pixels of stuff doesn't mean
others will do the same.
paul
|
2734.5 | | TLE::ROUTLEY | Kevin Routley - VAX/VMS & XD DEBUG | Thu May 17 1990 13:42 | 5 |
| re .4:
Absolutely. So how does one go about finding the size of window decoration?
Our current assumption has been 25 ...
Kevin
|
2734.6 | use the tree | TOOLEY::B_WACKER | | Thu May 17 1990 14:42 | 2 |
| Using XQueryTree and friends you can find out everything. I think
there's an xtree example in dw_examples or programming.
|
2734.7 | Depends on the technology... | FUEL::graham | The revolution will be televised | Sat May 19 1990 00:08 | 11 |
|
RE .4
>Assuming any particular decoration size sounds like a BAD idea, since you
>can't know which window manager is being used -- and, therefore, what size
>decoration.
Isn't this what the Motif convenience resource, XmisMotifMWMRunning
there for?
Kris..
|
2734.8 | | CLTVAX::dick | Schoeller - Failed Xperiment | Mon May 21 1990 11:36 | 7 |
| .7
Even if you know whether mwm is running, you don't know the exact size of the
frame. This is because, the frame thickness is customizable. You ought to
realize that Kris with the amount of hacking you do 8^{).
Dick
|
2734.9 | ok...and thanx for reminding me..but | FUEL::graham | The revolution will be televised | Mon May 28 1990 21:50 | 8 |
| re .8
Dick
there has to be a way to compute the frame size....just don't
how myself :-)
Kris..
|