diff --git a/src/post_modules/GTK/source/gdkdrawable.pre b/src/post_modules/GTK/source/gdkdrawable.pre
index c91ec1d45f72c6936ce05652eadca0f5ba519aa6..b0a9402e38e83abc58aae5736c6804de8b0ecf57 100644
--- a/src/post_modules/GTK/source/gdkdrawable.pre
+++ b/src/post_modules/GTK/source/gdkdrawable.pre
@@ -1,6 +1,8 @@
 class GdkDrawable;
 #ifndef __NT__
 #include <gdk/gdkx.h>
+#else
+#include <gdk/win32/gdkwin32.h>
 #endif
 // The GDK.Bitmap, GDK.Window and GDK.Pixmap classes are all GDK drawables.
 // <br />
@@ -194,7 +196,7 @@ NAME_ARGS(gc,bitmap,xsrc,ysrc,xdest,ydest,width,height);
 FUNCTION(xid, "function(void:int)" )
 {
   pop_n_elems( args );
-  push_int(GDK_WINDOW_XWINDOW( (GdkWindow *)THIS->obj ));
+  push_int((INT_TYPE)GDK_WINDOW_XWINDOW( (GdkWindow *)THIS->obj ));
 }
 
 FUNCTION(draw_image, "function(object,object,int,int,int,int,int,int:object)");
@@ -205,7 +207,7 @@ NAME_ARGS(gc,image,xsrc,ysrc,xdest,ydest,width,height);
 {
   struct object *g, *p;
   INT_TYPE xs, ys, xd, yd, w, h;
-  get_all_args("draw_pixmap",args,"%o%o%d%d%d%d%d%d",
+  get_all_args("draw_image",args,"%o%o%d%d%d%d%d%d",
 	       &g,&p,&xs,&ys,&xd,&yd,&w,&h);
   gdk_draw_image(TWIN,GC(g),get_gdkobject(p,Image),xs,ys,xd,yd,w,h);
   RETURN_THIS();
diff --git a/src/post_modules/GTK/source/gdkgc.pre b/src/post_modules/GTK/source/gdkgc.pre
index baedc03bf9bee17173257430b5b00a194e5041ed..f6be8d3a734e58087a5bc04bc4e63aade8dd10e5 100644
--- a/src/post_modules/GTK/source/gdkgc.pre
+++ b/src/post_modules/GTK/source/gdkgc.pre
@@ -58,7 +58,11 @@ RETURNS(mapping(string:mixed));
   if( v.clip_mask ) gdk_pixmap_ref( v.clip_mask );
 
   push_text( "fill" ); push_int( v.fill );
+#ifdef __NT__
+  push_text( "tile" ); push_gdkobject( v.tile, Pixmap );
+#else
   push_text( "tile" ); push_int( v.tile );
+#endif
   push_text( "function" ); push_int( v.function );
   {
     GdkColor *f = malloc( sizeof( GdkColor ) );
diff --git a/src/post_modules/GTK/source/gdkpixmap.pre b/src/post_modules/GTK/source/gdkpixmap.pre
index 0bd282a45e4eacc758406df5e6d72684570ccfba..432f759f02e68a109af49e49dbdd0e84d4b2f357 100644
--- a/src/post_modules/GTK/source/gdkpixmap.pre
+++ b/src/post_modules/GTK/source/gdkpixmap.pre
@@ -8,6 +8,12 @@ inherit GdkDrawable;
 //
 // NOIMG
 %{
+#ifdef __NT__
+#include <gdk/win32/gdkwin32.h>
+#else
+#include <gdk/gdkx.h>
+#endif
+
 GdkImage *pgtk_pixmap_setup( struct object *o, int *free)
 {
   if(get_gdkobject( o, Image ))
diff --git a/src/post_modules/GTK/source/gdkwindow.pre b/src/post_modules/GTK/source/gdkwindow.pre
index 585d2d8c9cf72118a23a5abc5938ae50020e31ac..3390687d3d94717e1dc0ead99dad782a3f8ce3c4 100644
--- a/src/post_modules/GTK/source/gdkwindow.pre
+++ b/src/post_modules/GTK/source/gdkwindow.pre
@@ -2,6 +2,8 @@ class GdkWindow;
 inherit GdkDrawable;
 #ifndef __NT__
 #include <gdk/gdkx.h>
+#else
+#include <gdk/win32/gdkwin32.h>
 #endif
 // a GDK.Window object.
 //
@@ -413,10 +415,13 @@ NAME_ARGS(property, offset, delete_when_done);
   else
     get_all_args( "get_property", args, "%o", &o);
 
-
   if(gdk_property_get( (GdkWindow *)THIS->obj,
                        get_gdkatom(o),
+#ifdef AnyPropertyType
                        AnyPropertyType,
+#else
+		       None,
+#endif
                        offset,
                        1024*1024*1024,
                        delete_when_done,
@@ -446,11 +451,7 @@ NAME_ARGS(property, offset, delete_when_done);
        push_Xpseudo32bitstring( retdata, actual_length );
        break;
     }
-#ifndef __NT__
-    XFree( retdata );
-#else
-    gfree( retdata );
-#endif
+    g_free( retdata );
     f_aggregate_mapping( 6 );
     return;
   }
diff --git a/src/post_modules/GTK/source/global.pre b/src/post_modules/GTK/source/global.pre
index bbe5f033ccf0d257d580b37ae367ae7fee442857..eae6b15d23d851206a8ad2393e5ff1af67aeef1c 100644
--- a/src/post_modules/GTK/source/global.pre
+++ b/src/post_modules/GTK/source/global.pre
@@ -1,5 +1,7 @@
 #ifndef __NT__
 #include <gdk/gdkx.h>
+#else
+#include <gdk/win32/gdkwin32.h>
 #endif
 require gnome;
 #include <applet-widget.h>
@@ -24,7 +26,7 @@ int IS_OBJECT_PROGRAM(struct program *X)
             || ((X) == pgtk_selection_data_program));
 }
 
-static void backend_callback()
+static void backend_callback(struct callback *_cb,void *_x,void *_y)
 {
   next_timeout = current_time;
 #ifndef __NT__
@@ -70,8 +72,13 @@ RETURNS(GDK.Window);
   pgtk_root_window = low_clone( pgtk_GdkWindow_program );
   call_c_initializers( pgtk_root_window );
   /* ugly...*/
+#ifdef GDK_ROOT_PARENT
+  ((struct object_wrapper *)pgtk_root_window->storage)->obj=
+    (void *)GDK_ROOT_PARENT();
+#else
   ((struct object_wrapper *)pgtk_root_window->storage)->obj=
     (void *)&gdk_root_parent;
+#endif
 
  add_ref(pgtk_root_window);
   ref_push_object( pgtk_root_window );
@@ -214,7 +221,7 @@ NAME_ARGS(argv, do_not_parse_rc);
   typedef RETSIGTYPE (*sigtype)(int);
   sigtype save_sigs[NSIG];
   for(sig=1;sig<NSIG;sig++)
-    signal(e,save_sigs[e]=signal(e,SIG_IGN));
+    signal(sig,save_sigs[sig]=signal(sig,SIG_IGN));
 
 #endif /* HAVE_SIGNAL */
 #endif /* ! HAVE_SIGACTION */
@@ -280,7 +287,7 @@ NAME_ARGS(argv, do_not_parse_rc);
 #else /* HAVE_SIGACTION */
 #if HAVE_SIGNAL
   for(sig=1;sig<NSIG;sig++)
-    signal(e,save_sigs[e]);
+    signal(sig,save_sigs[sig]);
 #endif /* HAVE_SIGNAL */
 #endif /* HAVE_SIGACTION */
   backend_cb = (void *)add_backend_callback( backend_callback, 0, 0);
@@ -320,7 +327,9 @@ FUNCTION(flush, "function(void:void)")
 FUNCTION(low_flush, "function(void:void)")
 // Flush X. Not normally needed.
 {
+#ifndef __NT__
   XFlush( GDK_DISPLAY() );
+#endif
   my_pop_n_elems( args );
   push_int( 0 );
 }
diff --git a/src/post_modules/GTK/source/gtkclist.pre b/src/post_modules/GTK/source/gtkclist.pre
index 17507da55dd06b912350a0e7b309640b86dc818d..c05cf1d868a5bd7a4bbe20486324c170c1d8a099 100644
--- a/src/post_modules/GTK/source/gtkclist.pre
+++ b/src/post_modules/GTK/source/gtkclist.pre
@@ -236,7 +236,8 @@ NAME_ARGS(row, column);
 // Return the pixmap and text for the specified cell as a mapping:<br />
 // ([ "spacing":spacing, "text":text, "pixmap":pixmap ])
 {
-  INT_TYPE x, y, s;
+  INT_TYPE x, y;
+  guint8 s;
   gchar *t = NULL;
   GdkPixmap *p = NULL;
   GdkBitmap *b = NULL;
diff --git a/src/post_modules/GTK/source/gtkpaned.pre b/src/post_modules/GTK/source/gtkpaned.pre
index 338ac34be7908cbe25efb1006fb2baf93a1a3640..f27f65ee2a5d78274b1d8bb9dcea84636256abdf 100644
--- a/src/post_modules/GTK/source/gtkpaned.pre
+++ b/src/post_modules/GTK/source/gtkpaned.pre
@@ -48,8 +48,8 @@ void pack2( widget widget, int resize, int shrink );
 
 member int handle_size;
 // The size of the handle, in pixels
-member int gutter_size;
-// The size of the gutter, in pixels
+/* member int gutter_size;
+ * // The size of the gutter, in pixels */
 member int handle_xpos;
 // The xpos of the handle, in pixels
 member int handle_ypos;
diff --git a/src/post_modules/GTK/source/gtksocket.pre b/src/post_modules/GTK/source/gtksocket.pre
index f7d7b0b851a93397c5fe4c7b9c9d746a8631d548..59562468f90b75b25253f2c3e7c3690f33a2da04 100644
--- a/src/post_modules/GTK/source/gtksocket.pre
+++ b/src/post_modules/GTK/source/gtksocket.pre
@@ -2,6 +2,8 @@ class socket;
 inherit container;
 #ifndef __NT__
 #include <gdk/gdkx.h>
+#else
+#include <gdk/win32/gdkwin32.h>
 #endif
 // Together with W(Plug), GTK.Socket provides the ability to embed
 // widgets from one process into another process in a fashion that is
@@ -34,7 +36,7 @@ FUNCTION(id, "function(void:int)");
   if( !GTK_WIDGET( THIS->obj )->window )
     error("You must realize this widget before calling this function.\n");
   my_pop_n_elems( args );
-  push_int(GDK_WINDOW_XWINDOW( GTK_WIDGET( THIS->obj )->window ));
+  push_int((INT_TYPE)GDK_WINDOW_XWINDOW( GTK_WIDGET( THIS->obj )->window ));
 }
 
 FUNCTION(has_plug, "function(void:int)");
diff --git a/src/post_modules/GTK/source/gtkwidget.pre b/src/post_modules/GTK/source/gtkwidget.pre
index 88eb4299cd32d9b2cf071a4e5220db8a5e3d8c50..e44c9fdc5c96cb261a758ddc6370e50901670c96 100644
--- a/src/post_modules/GTK/source/gtkwidget.pre
+++ b/src/post_modules/GTK/source/gtkwidget.pre
@@ -309,6 +309,8 @@ string get_name();
 
 #ifndef __NT__
 #include <gdk/gdkx.h>
+#else
+#include <gdk/win32/gdkwin32.h>
 #endif
 FUNCTION(set_cursor, "function(int,void|object,void|object:object)");
 ARGS(int|void,void|GDK.Color,void|GDK.Color);