I’m writing a application that put docks in the right side of the screen, like this:

I can reserve space in the side of the screen by using the _NET_WM_STRUT_PARTIAL, so that the maximized windows won’t overlap the docks.
In the image, you can see that there is a top panel. The problem is that the docks will overlap the panel. Is there a way to either find out the size of the panel, or to make a way that the panel will reduce to open space to the docks?
I’m using Xlib, by the way.
By using the good hint given by Havoc P, I was able to formulate this code, that returns the height of a top docking panel:
It might not be pretty, but it works 🙂