X developer reference documentation.
Offical X.Org documentation.
Print versions of various X Window System Manuals also exist.
The current version of this document is available in the xorg-docs package.
The current version of this document is available in the libX11 runtime package.
Other documents of interest.
The X Selection Mechanism or, How to Cut and Paste in 1000 lines or more (40 KiB, 13 pages)
1990 - Good information/tutorial about the X selection mechanism. From Papers and Talks by Keith Packard converted to PDF
Other documents about X server porting.
Strategies for Porting the X V11 Sample Server (77 KiB, 22 pages)
1998 - Mainly of historical interest now, but might give you some insight
Godzilla's Guide to Porting the X V11 Sample Server (38 KiB, 11 pages)
1990 - Old and thin, but relevant
Design of eXcursion Version 2 for Windows, Windows NT, and Windows 95 (301 KiB, 14 pages)
1996 - Discusses some of the difficulties in creating an X Server for Microsoft Windows. More geared towards implementing a server that translates X raster ops into Windows GDI raster ops. Cygwin/X does not currently translate raster ops, though the framework to do so is in place, and development on raster op translation could be resumed in the future.
Writing a Graphics Device Driver and DDX for the Digital UNIX X Server (602 KiB, 272 pages)
1997 - Contains some good hints in the DDX section