diff -ru NanoGTK-1.0/gtk+-1.2.7/gdk/gdkwindow.c NanoGTK-1.0.patched/gtk+-1.2.7/gdk/gdkwindow.c
--- NanoGTK-1.0/gtk+-1.2.7/gdk/gdkwindow.c	2002-06-11 18:29:29.000000000 +0200
+++ NanoGTK-1.0.patched/gtk+-1.2.7/gdk/gdkwindow.c	2009-10-10 20:02:21.000000000 +0200
@@ -449,8 +449,7 @@
 
           if (private->window_type == GDK_WINDOW_FOREIGN)
             {
-                fprintf(stderr,"Destroy foreign window not
-implemented\n");
+                fprintf(stderr,"Destroy foreign window not implemented\n");
             }
           else if (xdestroy)
             GrDestroyWindow (private->xwindow);
@@ -468,8 +467,7 @@
       break;
 
     case GDK_WINDOW_PIXMAP:
-      g_error ("called gdk_window_destroy on a pixmap (use
-gdk_pixmap_unref)");
+      g_error ("called gdk_window_destroy on a pixmap (use gdk_pixmap_unref)");
       break;
     }
 }
diff -ru NanoGTK-1.0/microwin089p8/src/demos/nanowm/wlist.c NanoGTK-1.0.patched/microwin089p8/src/demos/nanowm/wlist.c
--- NanoGTK-1.0/microwin089p8/src/demos/nanowm/wlist.c	2002-06-18 07:33:51.000000000 +0200
+++ NanoGTK-1.0.patched/microwin089p8/src/demos/nanowm/wlist.c	2009-10-10 20:50:57.000000000 +0200
@@ -13,7 +13,7 @@
 
 #include "nanowm.h"
 
-static win *windows = NULL;
+win *windows = NULL;
 
 /*
  * Find the windowlist entry for the specified window ID and return a pointer
diff -ru NanoGTK-1.0/microwin089p8/src/nanox/client_gtk.c NanoGTK-1.0.patched/microwin089p8/src/nanox/client_gtk.c
--- NanoGTK-1.0/microwin089p8/src/nanox/client_gtk.c	2002-06-18 19:51:57.000000000 +0200
+++ NanoGTK-1.0.patched/microwin089p8/src/nanox/client_gtk.c	2009-10-10 20:12:30.000000000 +0200
@@ -498,8 +498,7 @@
         {
                 /* FIXME: this should be handle, but for now,
                         should let the program return gracefully */
-                printf("Nano-X Warning: Data length is greater than
-                        MAXREQUESTSZ\n");
+                printf("Nano-X Warning: Data length is greater than MAXREQUESTSZ\n");
                 return;
         }
         req = AllocReqExtra(ChangeProp, nitems);
diff -ru NanoGTK-1.0/microwin089p8/src/nanox/clientfb.c NanoGTK-1.0.patched/microwin089p8/src/nanox/clientfb.c
--- NanoGTK-1.0/microwin089p8/src/nanox/clientfb.c	2001-09-17 00:31:25.000000000 +0200
+++ NanoGTK-1.0.patched/microwin089p8/src/nanox/clientfb.c	2009-10-10 20:32:18.000000000 +0200
@@ -9,7 +9,11 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
+#if 0
 #include <asm/page.h>		/* For definition of PAGE_SIZE */
+#else
+#include <sys/user.h>
+#endif
 #include <linux/fb.h>
 #include "nano-X.h"
 
diff -ru NanoGTK-1.0/microwin089p8/src/nanox/srvfunc_gtk.c NanoGTK-1.0.patched/microwin089p8/src/nanox/srvfunc_gtk.c
--- NanoGTK-1.0/microwin089p8/src/nanox/srvfunc_gtk.c	2002-06-19 19:01:49.000000000 +0200
+++ NanoGTK-1.0.patched/microwin089p8/src/nanox/srvfunc_gtk.c	2009-10-10 20:41:06.000000000 +0200
@@ -6,6 +6,101 @@
 #include "cjk.h"
 
 /*
+ * draw a thick line based on the 4 corners, assuming they are
+ * in the order suitable for GdFillPoly
+ */
+static void
+draw_thick_line (GR_DRAWABLE *dp, GR_POINT *corners)
+{
+        int i;
+
+        for (i = 0; i < 4; i++) {
+                corners[i].x += dp->x;
+                corners[i].y += dp->y;
+    }
+        GdFillPoly(dp->psd, 4, corners);
+}
+
+/*
+ * Calculate the offsets in the endpoints of straight line
+ * (x1,y1) --> (x2,y2), if it's being displaced by 'parallel_dist'.
+ * parallel_dist < 0 ===> leftward (or upward)
+ * parallel_dist > 0 ===> rightward (or downward)
+ */
+static void
+line_endpoints_offsets(GR_COORD x1, GR_COORD y1, GR_COORD x2,
+                       GR_COORD y2, double length,
+                       GR_COORD parallel_dist,
+                       GR_COORD *offset_x, GR_COORD *offset_y
+                      )
+{
+        GR_COORD xdelta = x2 - x1;
+        GR_COORD ydelta = y2 - y1;
+        GR_COORD abs_xdelta = (xdelta > 0)? xdelta : -xdelta;
+        GR_COORD abs_ydelta = (ydelta > 0)? ydelta : -ydelta;
+        double  roundup = (parallel_dist > 0)? 0.5 : -0.5;
+        if (xdelta == 0) {
+            *offset_x = parallel_dist;
+            *offset_y = 0;
+            return;
+        }
+        if (ydelta == 0) {
+            *offset_x = 0;
+            *offset_y = parallel_dist;
+            return;
+        }
+        /*
+         *   offset_y / parallel_dist = delta_x / length
+         *   offset_x / parallel_dist = delta_y / length
+         */
+        if (((ydelta > 0) && (xdelta > 0))
+           || ((ydelta < 0) && (xdelta < 0)) ) {
+           *offset_x = ((double)parallel_dist * (double)abs_ydelta / (double)length)  + roundup;
+           *offset_y = -(((double)parallel_dist * (double)abs_xdelta / (double)length)  + roundup);
+        }
+        else {
+           *offset_x = ((double)parallel_dist * (double)abs_ydelta / (double)length)  + roundup;
+           *offset_y = ((double)parallel_dist * (double)abs_xdelta / (double)length)  + roundup;
+
+        }
+}
+
+/*
+ * return 4 corners of a thick line from p1 -> p2.
+ * the 4 corners returned are  suitable to just pass into GdFillPoly
+ * as is.
+ */
+static void
+calc_thick_line_corners (GR_POINT p1, GR_POINT p2,
+                                                 int line_width, GR_POINT *corners)
+{
+        double  line_len;
+        int             start_offset, end_offset;
+        int             x_offset, y_offset;
+
+//        assert (line_width > 1);
+        /*
+         * get the 4 points of the rectangle,
+         * and draw it as a filled poly
+         */
+        start_offset = line_width / 2;
+        end_offset = start_offset - line_width + 1;
+        line_len = sqrt ((p2.x - p1.x)*(p2.x - p1.x) + (p2.y - p1.y)*(p2.y - p1.y));
+        line_endpoints_offsets(p1.x, p1.y, p2.x, p2.y, line_len,
+                                                        start_offset, &x_offset, &y_offset);
+        corners[0].x = p1.x + x_offset;
+        corners[0].y = p1.y + y_offset;
+        corners[1].x = p2.x + x_offset;
+        corners[1].y = p2.y + y_offset;
+        line_endpoints_offsets(p1.x, p1.y, p2.x, p2.y, line_len,
+                                                        end_offset, &x_offset, &y_offset);
+        corners[2].x = p2.x + x_offset;
+        corners[2].y = p2.y + y_offset;
+        corners[3].x = p1.x + x_offset;
+        corners[3].y = p1.y + y_offset;
+}
+
+/*
  * draw simple (width = 1) dash line with the segments given
  * only even segments are drawn
  */
@@ -93,50 +188,6 @@
         return;
 }
 
-/*
- * Calculate the offsets in the endpoints of straight line
- * (x1,y1) --> (x2,y2), if it's being displaced by 'parallel_dist'.
- * parallel_dist < 0 ===> leftward (or upward)
- * parallel_dist > 0 ===> rightward (or downward)
- */
-static void
-line_endpoints_offsets(GR_COORD x1, GR_COORD y1, GR_COORD x2,
-                       GR_COORD y2, double length,
-                       GR_COORD parallel_dist,
-                       GR_COORD *offset_x, GR_COORD *offset_y
-                      )
-{
-        GR_COORD xdelta = x2 - x1;
-        GR_COORD ydelta = y2 - y1;
-        GR_COORD abs_xdelta = (xdelta > 0)? xdelta : -xdelta;
-        GR_COORD abs_ydelta = (ydelta > 0)? ydelta : -ydelta;
-        double  roundup = (parallel_dist > 0)? 0.5 : -0.5;
-        if (xdelta == 0) {
-            *offset_x = parallel_dist;
-            *offset_y = 0;
-            return;
-        }
-        if (ydelta == 0) {
-            *offset_x = 0;
-            *offset_y = parallel_dist;
-            return;
-        }
-        /*
-         *   offset_y / parallel_dist = delta_x / length
-         *   offset_x / parallel_dist = delta_y / length
-         */
-        if (((ydelta > 0) && (xdelta > 0))
-           || ((ydelta < 0) && (xdelta < 0)) ) {
-           *offset_x = ((double)parallel_dist * (double)abs_ydelta / (double)length)  + roundup;
-           *offset_y = -(((double)parallel_dist * (double)abs_xdelta / (double)length)  + roundup);
-        }
-        else {
-           *offset_x = ((double)parallel_dist * (double)abs_ydelta / (double)length)  + roundup;
-           *offset_y = ((double)parallel_dist * (double)abs_xdelta / (double)length)  + roundup;
-
-        }
-}
-
 static int
 getVisibleRect(GR_WINDOW *wp, MWRECT **visible, GR_SIZE *numRects)
 {
@@ -311,57 +362,6 @@
 
 
 /*
- * return 4 corners of a thick line from p1 -> p2.
- * the 4 corners returned are  suitable to just pass into GdFillPoly
- * as is.
- */
-static void
-calc_thick_line_corners (GR_POINT p1, GR_POINT p2,
-                                                 int line_width, GR_POINT *corners)
-{
-        double  line_len;
-        int             start_offset, end_offset;
-        int             x_offset, y_offset;
-
-//        assert (line_width > 1);
-        /*
-         * get the 4 points of the rectangle,
-         * and draw it as a filled poly
-         */
-        start_offset = line_width / 2;
-        end_offset = start_offset - line_width + 1;
-        line_len = sqrt ((p2.x - p1.x)*(p2.x - p1.x) + (p2.y - p1.y)*(p2.y - p1.y));
-        line_endpoints_offsets(p1.x, p1.y, p2.x, p2.y, line_len,
-                                                        start_offset, &x_offset, &y_offset);
-        corners[0].x = p1.x + x_offset;
-        corners[0].y = p1.y + y_offset;
-        corners[1].x = p2.x + x_offset;
-        corners[1].y = p2.y + y_offset;
-        line_endpoints_offsets(p1.x, p1.y, p2.x, p2.y, line_len,
-                                                        end_offset, &x_offset, &y_offset);
-        corners[2].x = p2.x + x_offset;
-        corners[2].y = p2.y + y_offset;
-        corners[3].x = p1.x + x_offset;
-        corners[3].y = p1.y + y_offset;
-}
-
-/*
- * draw a thick line based on the 4 corners, assuming they are
- * in the order suitable for GdFillPoly
- */
-static void
-draw_thick_line (GR_DRAWABLE *dp, GR_POINT *corners)
-{
-        int i;
-
-        for (i = 0; i < 4; i++) {
-                corners[i].x += dp->x;
-                corners[i].y += dp->y;
-    }
-        GdFillPoly(dp->psd, 4, corners);
-}
-
-/*
  * Return segments of a dashed line based on starting and
  * ending co-ordinates, together dash-related info.
  * Assume x1,x2,y1,y2 are all >= 0
diff -ru NanoGTK-1.0/microwin089p8/src/nanox/srvutil.c NanoGTK-1.0.patched/microwin089p8/src/nanox/srvutil.c
--- NanoGTK-1.0/microwin089p8/src/nanox/srvutil.c	2002-06-19 04:59:23.000000000 +0200
+++ NanoGTK-1.0.patched/microwin089p8/src/nanox/srvutil.c	2009-10-10 20:47:06.000000000 +0200
@@ -15,6 +15,8 @@
 
 #include "serv.h"
 
+extern pop_input_list * remove_input(GR_WINDOW *wp, pop_input_list *l);
+
 /*
  * Help prevent future bugs by defining this variable to an illegal value.
  * These routines should not be referencing this, but should be using
