On 28.01.2012 01:37, Kaz Kylheku wrote:
> On 2012-01-28, Mirko K.<
mirkok...@googlemail.com> wrote:
>> What I get from xwininfo looks like this:
>>
>> # Easy case:
>> Corners: +395+228 -147+228 -147-330 +395-330
>
> These are not x geometry values, but evidently just a way of printing
> out the corners. ++ means upper left, -- lower right, etc.
> This notation is fixed.
Thanks for the info about ++ and --, and yes, these are corner
values, not actual X geometry specs.
>> # Case where I despair:
>> Corners: +-1269+165 -1487+165 -1487--46 +-1269--46
>
> WTF is that? Here it looks like the same notation: ++ -+ -- +-
> But some of the values are negative for whatever reason.
Yes, WTF. I suck at math and don't know much about X geometry, but
with a viewport-based WM like Compiz (maybe Compiz alone, later I
have to test this with others like Fvwm) the issue is more complex.
If you're curious, I can give you more examples. Some of them are
really strange (at least to me).
> Corners: +(-1269)+(165) -(1487)+(165) -(1487)-(-46) +(-1269)-(-46)
>
> ((If this gives you grief, why don't you extract this same info from the other
> output lines?
Because I need the rectangles that windows form relative to a) the
full virtual desktop, and b) the current viewport, and I thought (I
still think) that the Corners: specs are more close to this.
With the upper-left/width/height values, I have to do even more
calculations to get the rectangles.
But anyway, I got a perfect solution from Ed Morton.
> TXR job (
http://www.nongnu.org/txr):
Interesting. Will look at this.
Thank you! :-)