xwininfo -id .. gives '0' for Relative upper-left X: and Y: on Unity in Ubuntu 14.04 for any window
Submitted by Colin Keenan
Assigned to Xorg Project Team
xwininfo -id $(xdotool getactivewindow)
should give a lot of information about the active window, including the relative number of pixels between the X window and the out edge of a decoration. It works fine in Xfce under Arch Linux, but people using my scripts have complained that it doesn't work under Ubuntu 14.04 Unity, and just reports:
Relative upper-left X: 0
Relative upper-left Y: 0
For any window even though they do have a 28 pixel title bar and 1 px borders on sides and bottom. I got that information from https://wiki.ubuntu.com/Unity/Theming, which probably also has enough information for whoever works on this to get xwininfo properly determine the Relative upper-left X and Y numbers. They will almost always be 28 and 1, but could have been changed by following the instructions on that link.