diff --git win/tkWinX.c win/tkWinX.c
index e7720aed34..9c48b8a0e6 100644
--- win/tkWinX.c
+++ win/tkWinX.c
@@ -577,7 +577,6 @@ TkpOpenDisplay(
     display->display_name = ckalloc(strlen(display_name) + 1);
     strcpy(display->display_name, display_name);
 
-    display->cursor_font = 1;
     display->nscreens = 1;
     LastKnownRequestProcessed(display) = 1;
     display->qlen = 0;
diff --git xlib/X11/Xlib.h xlib/X11/Xlib.h
index 56d049c7ad..30e57e72d9 100644
--- xlib/X11/Xlib.h
+++ xlib/X11/Xlib.h
@@ -128,7 +128,9 @@ typedef int Status;
 typedef struct _XExtData {
 	int number;		/* number returned by XRegisterExtension */
 	struct _XExtData *next;	/* next item on list of data for structure */
-	int (*free_private)();	/* called to free private storage */
+	int (*free_private)(	/* called to free private storage */
+	struct _XExtData *extension
+	);
 	XPointer private_data;	/* data private to this extension. */
 } XExtData;
 
@@ -331,7 +333,17 @@ typedef struct _XImage {
     unsigned long blue_mask;
     XPointer obdata;		/* hook for the object routines to hang on */
     struct funcs {		/* image manipulation routines */
-	struct _XImage *(*create_image)();
+	struct _XImage *(*create_image)(
+		struct _XDisplay* /* display */,
+		Visual*		/* visual */,
+		unsigned int	/* depth */,
+		int		/* format */,
+		int		/* offset */,
+		char*		/* data */,
+		unsigned int	/* width */,
+		unsigned int	/* height */,
+		int		/* bitmap_pad */,
+		int		/* bytes_per_line */);
 #if NeedFunctionPrototypes
 	int (*destroy_image)        (struct _XImage *);
 	unsigned long (*get_pixel)  (struct _XImage *, int, int);
@@ -450,7 +462,9 @@ typedef struct _XDisplay {
 	XID resource_mask;	/* resource ID mask bits */
 	XID resource_id;	/* allocator current ID */
 	int resource_shift;	/* allocator shift to correct bits */
-	XID (*resource_alloc)(); /* allocator function */
+	XID (*resource_alloc)(	/* allocator function */
+		struct _XDisplay*
+	);
 	int byte_order;		/* screen byte order, LSBFirst, MSBFirst */
 	int bitmap_unit;	/* padding and data requirements */
 	int bitmap_pad;		/* padding requirements on bitmaps */
@@ -468,7 +482,9 @@ typedef struct _XDisplay {
 	char *bufmax;		/* Output buffer maximum+1 address. */
 	unsigned max_request_size; /* maximum number 32 bit words in request*/
 	struct _XrmHashBucketRec *db;
-	int (*synchandler)();	/* Synchronization handler */
+	int (*synchandler)(	/* Synchronization handler */
+		struct _XDisplay*
+		);
 	char *display_name;	/* "host:display" string used on this connect*/
 	int default_screen;	/* default screen for operations */
 	int nscreens;		/* number of screens on this server*/
@@ -481,45 +497,7 @@ typedef struct _XDisplay {
 	XModifierKeymap *modifiermap;	/* This server's modifier keymap */
 	int keysyms_per_keycode;/* number of rows */
 	char *xdefaults;	/* contents of defaults from server */
-	char *scratch_buffer;	/* place to hang scratch buffer */
-	unsigned long scratch_length;	/* length of scratch buffer */
-	int ext_number;		/* extension number on this display */
-	struct _XExten *ext_procs; /* extensions initialized on this display */
-	/*
-	 * the following can be fixed size, as the protocol defines how
-	 * much address space is available.
-	 * While this could be done using the extension vector, there
-	 * may be MANY events processed, so a search through the extension
-	 * list to find the right procedure for each event might be
-	 * expensive if many extensions are being used.
-	 */
-	Bool (*event_vec[128])();  /* vector for wire to event */
-	Status (*wire_vec[128])(); /* vector for event to wire */
-	KeySym lock_meaning;	   /* for XLookupString */
-	struct _XLockInfo *lock;   /* multi-thread state, display lock */
-	struct _XInternalAsync *async_handlers; /* for internal async */
-	unsigned long bigreq_size; /* max size of big requests */
-	struct _XLockPtrs *lock_fns; /* pointers to threads functions */
-	/* things above this line should not move, for binary compatibility */
-	struct _XKeytrans *key_bindings; /* for XLookupString */
-	Font cursor_font;	   /* for XCreateFontCursor */
-	struct _XDisplayAtoms *atoms; /* for XInternAtom */
-	unsigned int mode_switch;  /* keyboard group modifiers */
-	struct _XContextDB *context_db; /* context database */
-	Bool (**error_vec)();      /* vector for wire to error */
-	/*
-	 * Xcms information
-	 */
-	struct {
-	   XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */
-	   XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */
-	   XPointer perVisualIntensityMaps;
-				  /* linked list of XcmsIntensityMap */
-	} cms;
-	struct _XIMFilter *im_filters;
-	struct _XSQEvent *qfree; /* unallocated event queue elements */
-	unsigned long next_event_serial_num; /* inserted into next queue elt */
-	int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
+	/* there is more to this structure, but it is private to Xlib */
 } Display;
 
 #if NeedFunctionPrototypes	/* prototypes require event type definitions */
@@ -1050,11 +1028,15 @@ typedef struct {
     XFontSet        font_set;
 } XwcTextItem;
 
-typedef void (*XIMProc)();
-
 typedef struct _XIM *XIM;
 typedef struct _XIC *XIC;
 
+typedef void (*XIMProc)(
+    XIM,
+    XPointer,
+    XPointer
+);
+
 typedef unsigned long XIMStyle;
 
 typedef struct {
