Getting started with X programming


I have some spare time on my hands at the moment and would like to try my hand at making my own window manager. I did some C programming back in the day (10 years ago) but am very rusty. I could spare an hour a day at the moment.

How can I get back into it and are there any books or online tutorials I could take a look at?

Eventually, if I stay at it, I would like to develop either a wm or depending on how my interests shift contribute code to the FreeBSD project.