I am trying to build a window manager (as hobby project). I have the basic taskbar implemented as a window which is positioned at the bottom of the screen. However, I can raise other windows above it. Ideally the taskbar would stay at the top no matter what. I thought simply raising it every time it is not at the top would be fine, but I read it can cause issues with two windows attempting to fight for the top position.
Is there a preferred xlib way to ensure the taskbar remains at the topmost position (and all windows go behind it when being dragged)?