I'm a low level C programmer, and through an odd turn of events, I've come to start writing a GUI in Linux via Xlib (seeing as that seems to be the low level solution).
That said, I'll jump right into the main issues facing me right now.

I wish to get better control over the window (and possibly the window manager), so first off I implemented borderless Fullscreen capabilities. This basically involved creating a _NET_WM_STATE_FULLSCREEN Atom and sending it to the server as an Event with data.l[0] set to 0 for off, 1 for on. It works wonders.

My problem, then, is how to *detect* if it is in fullscreen at any given moment. I've tried XGetWMProtocols, but it only gives me a close window atom that I believe I registered earlier. I tried XGetWindowProperty and passing in a fullscreen Atom, but it just gives me a bunch of 0's all the time.

Also, how would I enable/disable the border in windowed mode?

And I guess I'll throw in 1 final question just for the heck of it. Where could I get some good documentation/tutorials for Xlib aside from tronche.com (which seems to just be an online copy of the man files)? I've tried googling, but all I've come up with is thousands of broken links. I'm aware that xlib is slowly dying in favour of gtk, motif/lesstif, qt, and wx, but it can't be that dead. After all, most of them make calls straight to X anyways. Which means that someone's still behind the scenes writing the low level calls to X for them.

Thanks in advance