Index: spatial/deco.c
--- spatial/deco.c.orig
+++ spatial/deco.c
@@ -3,15 +3,17 @@
  notice is retained. */
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
 #include <sys/time.h>
+#include <unistd.h>
 #include <X11/Xlib.h>
+#include <X11/Xutil.h>
 #include <X11/keysym.h>
 #include "spatial.h"
 
 extern GC gcblack, gcwhite, gcinv, gccopy, gcline, gcfield, gccubes[]; 
 
-extern void pause_redraw(), add_cubie();
-
 void pauseloop()
 {
     short status, res, lev;
@@ -43,7 +45,7 @@ void pauseloop()
 		pause_redraw();
 		break;
 	    case KeyPress:
-		XLookupString(&event, &key, 1, &ksym, NULL);
+		XLookupString(&event.xkey, &key, 1, &ksym, NULL);
 		/*printf("got '%s'\n", XKeysymToString(ksym));*/
 		switch (ksym) {
 		    case XK_Escape:
