Which wasn't necessarly how X Windows worked in commercial UNIX, so having the source code wasn't of much help.
And that O'reilly X Windows book series, The Definitive Guides to the X Window System, a "tiny" set of 8 books, only for the UI stack.
Its a been a while since I did any X development but as far as I recall as an application (client) developer you generally only needed to know about the client library you were using together with some lower level details from Xlib?
Although, you're going to have to be fairly proficient to get your head around that stuff too.
Agree that X11 has a dreadful API.