You are not logged in.
Pages: 1
Hi,
I'm trying to write a script to align several windows.
I have a top panel of height 40px. Running xprop on the panel gives:
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 0, 0
so there are no borders/padding added.
Running xprop on an xfce4-terminal gives:
(_NET_FRAME_EXTENT(CARDINAL) = 4, 4, 24, 4
so there is a 24px (top) + 4px (bottom) frame added.
Now I'd like to move the terminal to 200,0 with a size of 500X500. Running wmctrl:
wmctrl -r terminal -e 0,200,0,500,500
places the terminal at X=200 Y=88.
Why Y=88? there are 40px from the top panel so why not Y=40?.
Even adding the top + bottom frame thickness (24+4=28) doesn't add up to 88.
My question: how do I determine a window's final geometry given a top panel + desired window geometry + frame extensions (_NET_FRAME_EXTENT) ?.
Thanks
Offline
bumping.
Thanks
Offline
Why Y=88? there are 40px from the top panel so why not Y=40?.
Do you have any margins set?
Also does this happen with any other windows as well?
I can't replicate this in my testing, however, wmctrl returns wrong geometry values for me (example: panel is 40 high, frame extents are 24, windows is position at y coordinate 41, but wmctrl reports 84.
My question: how do I determine a window's final geometry given a top panel + desired window geometry + frame extensions (_NET_FRAME_EXTENT) ?.
Thanks
I would think x,y coordinates + frame extents + panel height.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
jt1122 wrote:Why Y=88? there are 40px from the top panel so why not Y=40?.
Do you have any margins set?
Also does this happen with any other windows as well?
I can't replicate this in my testing, however, wmctrl returns wrong geometry values for me (example: panel is 40 high, frame extents are 24, windows is position at y coordinate 41, but wmctrl reports 84.
My question: how do I determine a window's final geometry given a top panel + desired window geometry + frame extensions (_NET_FRAME_EXTENT) ?.
Thanks
I would think x,y coordinates + frame extents + panel height.
Thanks.
It happens with other windows as well. The only exception is when I run
xfce4-terminal --hide-borders &
wmctrl -r terminal -e 0,500,0,200,200
returns Y=0 for the terminal window which is correct.
I can't replicate this in my testing, however, wmctrl returns wrong geometry values for me (example: panel is 40 high, frame extents are 24, windows is position at y coordinate 41, but wmctrl reports 84.
Could you provide the full 4 window extents reported by xprop?.
Thanks
Last edited by jt1122 (2024-01-27 17:30:06)
Offline
Pages: 1
[ Generated in 0.010 seconds, 9 queries executed - Memory usage: 533.29 KiB (Peak: 534.13 KiB) ]