diff -u -r gtk+-2.14.7.ori/gdk/directfb/gdkcolor-directfb.c gdk/directfb/gdkcolor-directfb.c
--- gtk+-2.14.7.ori/gdk/directfb/gdkcolor-directfb.c	2009-01-07 17:33:47.000000000 +0100
+++ gdk/directfb/gdkcolor-directfb.c	2009-01-16 23:40:21.000000000 +0100
@@ -222,7 +222,7 @@
 
           colormap->visual = visual;
           colormap->size   = visual->colormap_size;
-          colormap->colors = g_new0 (GdkColor, colormap->size);
+         colormap->colors = g_new0 (GdkColor, colormap->size);
 
           private = g_new0 (GdkColormapPrivateDirectFB, 1);
           private->info = g_new0 (GdkColorInfo, colormap->size);
diff -u -r gtk+-2.14.7.ori/gdk/directfb/gdkdisplay-directfb.c gdk/directfb/gdkdisplay-directfb.c
--- gtk+-2.14.7.ori/gdk/directfb/gdkdisplay-directfb.c	2009-01-07 17:33:47.000000000 +0100
+++ gdk/directfb/gdkdisplay-directfb.c	2009-01-16 23:40:21.000000000 +0100
@@ -130,10 +130,10 @@
   _gdk_screen = g_object_new (GDK_TYPE_SCREEN, NULL);
 
   _gdk_visual_init ();
-
+  
+  _gdk_windowing_window_init ();
   gdk_screen_set_default_colormap (_gdk_screen,
                                    gdk_screen_get_system_colormap (_gdk_screen));
-  _gdk_windowing_window_init ();
   _gdk_windowing_image_init ();
 
   _gdk_input_init ();
diff -u -r gtk+-2.14.7.ori/gdk/directfb/gdkdnd-directfb.c gdk/directfb/gdkdnd-directfb.c
--- gtk+-2.14.7.ori/gdk/directfb/gdkdnd-directfb.c	2009-01-07 17:33:47.000000000 +0100
+++ gdk/directfb/gdkdnd-directfb.c	2009-01-16 23:40:25.000000000 +0100
@@ -251,9 +251,9 @@
 
   new_context->targets = g_list_copy (context->targets);
 
-  gdk_window_set_events (new_context->source_window,
-			 gdk_window_get_events (new_context->source_window) |
-			 GDK_PROPERTY_CHANGE_MASK);
+  gdk_window_directfb_set_events (new_context->source_window,
+								 gdk_window_directfb_get_events (new_context->source_window) |
+								 GDK_PROPERTY_CHANGE_MASK);
   new_context->actions = context->actions;
 
   event.dnd.type       = GDK_DRAG_ENTER;
diff -u -r gtk+-2.14.7.ori/gdk/directfb/gdkevents-directfb.c gdk/directfb/gdkevents-directfb.c
--- gtk+-2.14.7.ori/gdk/directfb/gdkevents-directfb.c	2009-01-07 17:33:47.000000000 +0100
+++ gdk/directfb/gdkevents-directfb.c	2009-01-16 23:40:22.000000000 +0100
@@ -584,7 +584,7 @@
         if (dfbevent->type == DWET_BUTTONDOWN  &&  !click_grab  &&  child)
           {
             if (gdk_directfb_pointer_grab (child, FALSE,
-                                           gdk_window_get_events (child),
+                                           gdk_window_directfb_get_events (child),
                                            NULL, NULL,
                                            GDK_CURRENT_TIME,
                                            TRUE) == GDK_GRAB_SUCCESS)
@@ -795,7 +795,7 @@
         /* this makes sure pointer is set correctly when it previously left
          * a window being not standard shaped
          */
-        gdk_window_set_cursor (window, NULL);
+        gdk_window_directfb_set_cursor (window, NULL);
         gdk_directfb_window_send_crossing_events (NULL, child,
                                                   GDK_CROSSING_NORMAL);
 
diff -u -r gtk+-2.14.7.ori/gdk/directfb/gdkgeometry-directfb.c gdk/directfb/gdkgeometry-directfb.c
--- gtk+-2.14.7.ori/gdk/directfb/gdkgeometry-directfb.c	2009-01-07 17:33:47.000000000 +0100
+++ gdk/directfb/gdkgeometry-directfb.c	2009-01-16 23:40:25.000000000 +0100
@@ -41,7 +41,7 @@
 
 
 void
-_gdk_windowing_window_get_offsets (GdkWindow *window,
+_gdk_window_directfb_get_offsets (GdkWindow *window,
                                    gint      *x_offset,
                                    gint      *y_offset)
 {
@@ -58,18 +58,8 @@
   return FALSE;
 }
 
-/**
- * gdk_window_scroll:
- * @window: a #GdkWindow
- * @dx: Amount to scroll in the X direction
- * @dy: Amount to scroll in the Y direction
- *
- * Scroll the contents of its window, both pixels and children, by
- * the given amount. Portions of the window that the scroll operation
- * brings in from offscreen areas are invalidated.
- **/
 void
-gdk_window_scroll (GdkWindow *window,
+_gdk_window_directfb_scroll (GdkWindow *window,
                    gint       dx,
                    gint       dy)
 {
@@ -145,26 +135,11 @@
     }
 }
 
-/**
- * gdk_window_move_region:
- * @window: a #GdkWindow
- * @region: The #GdkRegion to move
- * @dx: Amount to move in the X direction
- * @dy: Amount to move in the Y direction
- * 
- * Move the part of @window indicated by @region by @dy pixels in the Y 
- * direction and @dx pixels in the X direction. The portions of @region 
- * that not covered by the new position of @region are invalidated.
- * 
- * Child windows are not moved.
- * 
- * Since: 2.8
- **/
 void
-gdk_window_move_region (GdkWindow       *window,
-                        const GdkRegion *region,
-                        gint             dx,
-                        gint             dy)
+_gdk_window_directfb_move_region (GdkWindow       *window,
+							    const GdkRegion *region,
+							    gint             dx,
+							    gint             dy)
 {
   GdkWindowObject         *private;
   GdkDrawableImplDirectFB *impl;
diff -u -r gtk+-2.14.7.ori/gdk/directfb/gdkwindow-directfb.c gdk/directfb/gdkwindow-directfb.c
--- gtk+-2.14.7.ori/gdk/directfb/gdkwindow-directfb.c	2009-01-07 17:33:47.000000000 +0100
+++ gdk/directfb/gdkwindow-directfb.c	2009-01-16 23:40:21.000000000 +0100
@@ -34,6 +34,7 @@
 #include "config.h"
 #include "gdk.h"
 #include "gdkwindow.h"
+#include "gdkwindowimpl.h"
 
 #include "gdkdirectfb.h"
 #include "gdkprivate-directfb.h"
@@ -67,6 +68,20 @@
 static void gdk_window_impl_directfb_class_init (GdkWindowImplDirectFBClass *klass);
 static void gdk_window_impl_directfb_finalize   (GObject                    *object);
 
+
+void gdk_window_directfb_hide (GdkWindow *window);
+GdkEventMask gdk_window_directfb_get_events (GdkWindow *window);
+void gdk_window_directfb_set_events (GdkWindow    *window, GdkEventMask  event_mask);
+void gdk_window_directfb_set_cursor (GdkWindow *window, GdkCursor *cursor);
+gboolean gdk_window_directfb_get_origin (GdkWindow *window, gint *x, gint *y);
+void gdk_window_directfb_raise (GdkWindow *window);
+void gdk_window_directfb_move_resize (GdkWindow *window, gboolean with_move, gint x, gint y, gint width, gint height);
+void gdk_window_directfb_clear_area (GdkWindow *window, gint x, gint y, gint width, gint height, gboolean send_expose_is_unusedfornow);
+
+void _gdk_window_directfb_scroll (GdkWindow *window, gint dx, gint dy);
+void _gdk_window_directfb_get_offsets (GdkWindow *window, gint *x_offset, gint *y_offset);
+void _gdk_window_directfb_move_region (GdkWindow *window, const GdkRegion *region, gint dx, gint dy);
+
 typedef struct
 {
   GdkWindowChildChanged  changed;
@@ -99,20 +114,19 @@
   while (tmp_list)
     {
       GdkWindowObject       *private = GDK_WINDOW_OBJECT( tmp_list->data );
-      GdkWindowImplDirectFB *wimpl   = GDK_WINDOW_IMPL_DIRECTFB( private->impl );
-      
+      GdkWindowImplDirectFB *impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
       if (private->update_freeze_count)
         {
           D_DEBUG_AT( GDKDFB_Updates, "  -> %p frozen [%4d,%4d-%4dx%4d] (%d boxes)\n",
-                      private, DFB_RECTANGLE_VALS_FROM_REGION( &wimpl->flips.bounding ),
-                      wimpl->flips.num_regions );
+                      private, DFB_RECTANGLE_VALS_FROM_REGION( &impl->flips.bounding ),
+                      impl->flips.num_regions );
           update_windows = g_slist_prepend (update_windows, private);
         }
       else
         {
           D_DEBUG_AT( GDKDFB_Updates, "  -> %p update [%4d,%4d-%4dx%4d] (%d boxes)\n",
-                      private, DFB_RECTANGLE_VALS_FROM_REGION( &wimpl->flips.bounding ),
-                      wimpl->flips.num_regions );
+                      private, DFB_RECTANGLE_VALS_FROM_REGION( &impl->flips.bounding ),
+                      impl->flips.num_regions );
           gdk_window_process_updates(tmp_list->data,TRUE);
         }
       
@@ -188,9 +202,7 @@
 GdkWindow * _gdk_parent_root = NULL;
 static void
 gdk_window_impl_directfb_paintable_init (GdkPaintableIface *iface);
-
-
-
+static void gdk_window_impl_iface_init (GdkWindowImplIface *iface);
 
 
 GType
@@ -201,32 +213,40 @@
   if (!object_type)
     {
       static const GTypeInfo object_info =
-        {
-          sizeof (GdkWindowImplDirectFBClass),
-          (GBaseInitFunc) NULL,
-          (GBaseFinalizeFunc) NULL,
-          (GClassInitFunc) gdk_window_impl_directfb_class_init,
-          NULL,           /* class_finalize */
-          NULL,           /* class_data */
-          sizeof (GdkWindowImplDirectFB),
-          0,              /* n_preallocs */
-          (GInstanceInitFunc) gdk_window_impl_directfb_init,
-        };
+      {
+        sizeof (GdkWindowImplDirectFBClass),
+        (GBaseInitFunc) NULL,
+        (GBaseFinalizeFunc) NULL,
+        (GClassInitFunc) gdk_window_impl_directfb_class_init,
+        NULL,           /* class_finalize */
+        NULL,           /* class_data */
+        sizeof (GdkWindowImplDirectFB),
+        0,              /* n_preallocs */
+        (GInstanceInitFunc) gdk_window_impl_directfb_init,
+      };
 
-    static const GInterfaceInfo paintable_info =
+      static const GInterfaceInfo paintable_info =
+      {
+        (GInterfaceInitFunc) gdk_window_impl_directfb_paintable_init,
+        NULL,
+        NULL
+      };
+      static const GInterfaceInfo window_info =
       {
-    (GInterfaceInitFunc) gdk_window_impl_directfb_paintable_init,
-    NULL,
-    NULL
+        (GInterfaceInitFunc) gdk_window_impl_iface_init,
+        NULL,
+        NULL
       };
 
       object_type = g_type_register_static (GDK_TYPE_DRAWABLE_IMPL_DIRECTFB,
                                             "GdkWindowImplDirectFB",
                                             &object_info, 0);
-       g_type_add_interface_static (object_type,
+      g_type_add_interface_static (object_type,
                    GDK_TYPE_PAINTABLE,
                    &paintable_info);
-
+      g_type_add_interface_static (object_type,
+                   GDK_TYPE_WINDOW_IMPL,
+                   &window_info);
     }
 
   return object_type;
@@ -286,7 +306,7 @@
   D_DEBUG_AT( GDKDFB_Window, "%s( %p ) <- %dx%d\n", __FUNCTION__, impl, impl->drawable.width, impl->drawable.height );
 
   if (GDK_WINDOW_IS_MAPPED (impl->drawable.wrapper))
-    gdk_window_hide (impl->drawable.wrapper);
+    gdk_window_directfb_hide (impl->drawable.wrapper);
 
   if (impl->cursor)
     gdk_cursor_unref (impl->cursor);
@@ -406,6 +426,8 @@
 
   _gdk_parent_root = g_object_new (GDK_TYPE_WINDOW, NULL);
   private = GDK_WINDOW_OBJECT (_gdk_parent_root);
+  private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
+  D_DEBUG_AT( GDKDFB_Window, "DFB:%s:allocating window impl\n", __FUNCTION__);
   impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
 
   private->window_type = GDK_WINDOW_ROOT;
@@ -475,7 +497,9 @@
 
   window = g_object_new (GDK_TYPE_WINDOW, NULL);
   private = GDK_WINDOW_OBJECT (window);
-
+  private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
+  D_DEBUG_AT( GDKDFB_Window, "DFB:%s:allocating window impl\n", __FUNCTION__);
+  
   parent_private = GDK_WINDOW_OBJECT (parent);
   parent_impl = GDK_WINDOW_IMPL_DIRECTFB (parent_private->impl);
   private->parent = parent_private;
@@ -483,7 +507,7 @@
   x = (attributes_mask & GDK_WA_X) ? attributes->x : 0;
   y = (attributes_mask & GDK_WA_Y) ? attributes->y : 0;
 
-  gdk_window_set_events (window, attributes->event_mask | GDK_STRUCTURE_MASK);
+  gdk_window_directfb_set_events (window, attributes->event_mask | GDK_STRUCTURE_MASK);
 
   impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
   impl->drawable.wrapper = GDK_DRAWABLE (window);
@@ -622,7 +646,7 @@
   	  private->depth = visual->depth;
     }
 
-  gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
+  gdk_window_directfb_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
                                   (attributes->cursor) : NULL));
 
   if (parent_private)
@@ -1017,7 +1041,7 @@
       event = gdk_directfb_event_make (event_win, GDK_LEAVE_NOTIFY);
       event->crossing.subwindow = NULL;
 
-      gdk_window_get_origin (a, &x_int, &y_int);
+      gdk_window_directfb_get_origin (a, &x_int, &y_int);
 
       event->crossing.x      = x - x_int;
       event->crossing.y      = y - y_int;
@@ -1057,7 +1081,7 @@
 
               event->crossing.subwindow = g_object_ref (last);
 
-              gdk_window_get_origin (win, &x_int, &y_int);
+              gdk_window_directfb_get_origin (win, &x_int, &y_int);
 
               event->crossing.x      = x - x_int;
               event->crossing.y      = y - y_int;
@@ -1115,7 +1139,7 @@
 
               event->crossing.subwindow = g_object_ref (next);
 
-              gdk_window_get_origin (win, &x_int, &y_int);
+              gdk_window_directfb_get_origin (win, &x_int, &y_int);
 
               event->crossing.x      = x - x_int;
               event->crossing.y      = y - y_int;
@@ -1148,7 +1172,7 @@
 
       event->crossing.subwindow = NULL;
 
-      gdk_window_get_origin (b, &x_int, &y_int);
+      gdk_window_directfb_get_origin (b, &x_int, &y_int);
 
       event->crossing.x      = x - x_int;
       event->crossing.y      = y - y_int;
@@ -1185,8 +1209,7 @@
 }
 
 static void
-show_window_internal (GdkWindow *window,
-                      gboolean   raise)
+gdk_window_directfb_show (GdkWindow *window, gboolean raise)
 {
   GdkWindowObject       *private;
   GdkWindowImplDirectFB *impl;
@@ -1202,7 +1225,7 @@
       private->state &= ~GDK_WINDOW_STATE_WITHDRAWN;
 
       if (raise)
-        gdk_window_raise (window);
+        gdk_window_directfb_raise (window);
 
       if (all_parents_shown (GDK_WINDOW_OBJECT (private)->parent))
         {
@@ -1231,27 +1254,27 @@
 }
 
 void
-gdk_window_show_unraised (GdkWindow *window)
+_gdk_window_show_unraised (GdkWindow *window)
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 
   D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
 
-  show_window_internal (window, FALSE);
+  gdk_window_directfb_show (window, FALSE);
 }
 
 void
-gdk_window_show (GdkWindow *window)
+_gdk_window_directfb_show_raised (GdkWindow *window)
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 
   D_DEBUG_AT( GDKDFB_Window, "%s( %p )\n", __FUNCTION__, window );
 
-  show_window_internal (window, TRUE);
+  gdk_window_directfb_show (window, TRUE);
 }
 
 void
-gdk_window_hide (GdkWindow *window)
+gdk_window_directfb_hide (GdkWindow *window)
 {
   GdkWindowObject       *private;
   GdkWindowImplDirectFB *impl;
@@ -1276,11 +1299,11 @@
 
       if (!private->input_only && private->parent)
         {
-          _gdk_windowing_window_clear_area (GDK_WINDOW (private->parent),
+          gdk_window_directfb_clear_area (GDK_WINDOW (private->parent),
                                             private->x,
                                             private->y,
                                             impl->drawable.width,
-                                            impl->drawable.height);
+                                            impl->drawable.height, TRUE);
         }
 
       event_win = gdk_directfb_other_event_window (window, GDK_UNMAP);
@@ -1300,18 +1323,18 @@
 }
 
 void
-gdk_window_withdraw (GdkWindow *window)
+gdk_window_directfb_withdraw (GdkWindow *window)
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 
   /* for now this should be enough */
-  gdk_window_hide (window);
+  gdk_window_directfb_hide (window);
 }
 
 void
-gdk_window_move (GdkWindow *window,
-                 gint       x,
-                 gint       y)
+gdk_window_directfb_move (GdkWindow *window,
+				         gint       x,
+				         gint       y)
 {
   GdkWindowObject       *private;
   GdkWindowImplDirectFB *impl;
@@ -1354,9 +1377,9 @@
 }
 
 void
-gdk_window_resize (GdkWindow *window,
-                   gint       width,
-                   gint       height)
+gdk_window_directfb_resize (GdkWindow *window,
+				           gint       width,
+				           gint       height)
 {
   GdkWindowObject *private;
   gint             x, y;
@@ -1379,7 +1402,7 @@
 	(*data->get_pos) (window, &x, &y, data->user_data);
     }
 
-  gdk_window_move_resize (window, x, y, width, height);
+  gdk_window_directfb_move_resize (window, TRUE, x, y, width, height);
 }
 
 void
@@ -1440,11 +1463,12 @@
 }
 
 void
-gdk_window_move_resize (GdkWindow *window,
-                        gint       x,
-                        gint       y,
-                        gint       width,
-                        gint       height)
+gdk_window_directfb_move_resize (GdkWindow *window,
+	                            gboolean   with_move,
+					            gint       x,
+					            gint       y,
+					            gint       width,
+					            gint       height)
 {
   GdkWindowObject       *private;
   GdkWindowImplDirectFB *impl;
@@ -1478,27 +1502,33 @@
 
   if (impl->drawable.width == width  &&  impl->drawable.height == height)
     {
-      gdk_window_move (window, x, y);
+      if(with_move)
+		gdk_window_directfb_move (window, x, y);
     }
   else if (impl->window)
     {
   	  private->x = x;
   	  private->y = y;
-      impl->window->MoveTo (impl->window, x, y);
+      if(with_move)
+		impl->window->MoveTo (impl->window, x, y);
       impl->window->Resize (impl->window, width, height);
     }
   else
     {
-      GdkRectangle  old =
-      { private->x, private->y, impl->drawable.width, impl->drawable.height };
-      _gdk_directfb_move_resize_child (window, x, y, width, height);
+      GdkRectangle old = { private->x, private->y, impl->drawable.width, impl->drawable.height };
+      GdkRectangle new = { x, y, width, height };
+	  if(!with_move) 
+	  {
+		  new.x = private->x;
+  		  new.y = private->y;
+	  }
+	  _gdk_directfb_move_resize_child (window, new.x, new.y, new.width, new.height);
       _gdk_directfb_calc_abs (window);
 
       if (GDK_WINDOW_IS_MAPPED (private))
         {
           GdkWindow    *mousewin;
-          GdkRectangle  new = { x, y, width, height };
-
+          
           gdk_rectangle_union (&new, &old, &new);
           gdk_window_invalidate_rect (GDK_WINDOW (private->parent), &new,TRUE);
 
@@ -1510,11 +1540,11 @@
     }
 }
 
-void
-_gdk_window_reparent (GdkWindow *window,
-                     GdkWindow *new_parent,
-                     gint       x,
-                     gint       y)
+gboolean
+gdk_window_directfb_reparent (GdkWindow *window,
+					         GdkWindow *new_parent,
+					         gint       x,
+					         gint       y)
 {
   GdkWindowObject *window_private;
   GdkWindowObject *parent_private;
@@ -1523,10 +1553,10 @@
   GdkWindowImplDirectFB *parent_impl;
   GdkVisual             *visual;
 
-  g_return_if_fail (GDK_IS_WINDOW (window));
+  g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
 
   if (GDK_WINDOW_DESTROYED (window))
-    return;
+    return FALSE;
 
   if (!new_parent)
     new_parent = _gdk_parent_root;
@@ -1539,7 +1569,7 @@
 
   /* already parented */
   if( window_private->parent == (GdkWindowObject *)new_parent )
-          return;
+          return FALSE;
 
   window_private->parent = (GdkWindowObject *) new_parent;
 
@@ -1593,7 +1623,7 @@
         {
 		  g_assert(0);
           _gdk_window_destroy (window, FALSE);
-          return;
+          return FALSE;
         }
         /* we hold a reference count on ourselves */
         g_object_ref (window);
@@ -1609,14 +1639,16 @@
                           &rect,
                           &impl->drawable.surface);
    }
+   return FALSE;
 }
 
 void
-_gdk_windowing_window_clear_area (GdkWindow *window,
-                                  gint       x,
-                                  gint       y,
-                                  gint       width,
-                                  gint       height)
+gdk_window_directfb_clear_area (GdkWindow *window,
+								gint       x,
+								gint       y,
+								gint       width,
+								gint       height,
+								gboolean   send_expose_is_unusedfornow)
 {
   GdkWindowObject         *private;
   GdkDrawableImplDirectFB *impl;
@@ -1738,13 +1770,13 @@
     return;
   }
 
-  _gdk_windowing_window_clear_area (window, x, y, width, height);
+  gdk_window_directfb_clear_area (window, x, y, width, height, TRUE);
 
   gdk_window_invalidate_rect (window, &rect, TRUE);
 }
 
 void
-gdk_window_raise (GdkWindow *window)
+gdk_window_directfb_raise (GdkWindow *window)
 {
   GdkWindowImplDirectFB *impl;
 
@@ -1775,7 +1807,7 @@
 }
 
 void
-gdk_window_lower (GdkWindow *window)
+gdk_window_directfb_lower (GdkWindow *window)
 {
   GdkWindowImplDirectFB *impl;
 
@@ -1908,8 +1940,8 @@
 }
 
 void
-gdk_window_set_background (GdkWindow *window,
-                           const GdkColor  *color)
+gdk_window_directfb_set_background (GdkWindow *window,
+                       				const GdkColor  *color)
 {
   GdkWindowObject *private;
 
@@ -1931,9 +1963,9 @@
 }
 
 void
-gdk_window_set_back_pixmap (GdkWindow *window,
-                            GdkPixmap *pixmap,
-                            gint       parent_relative)
+gdk_window_directfb_set_back_pixmap (GdkWindow *window,
+				                    GdkPixmap *pixmap,
+				                    gint       parent_relative)
 {
   GdkWindowObject *private;
   GdkPixmap       *old_pixmap;
@@ -1973,8 +2005,8 @@
 }
 
 void
-gdk_window_set_cursor (GdkWindow *window,
-                       GdkCursor *cursor)
+gdk_window_directfb_set_cursor (GdkWindow *window,
+                			   GdkCursor *cursor)
 {
   GdkWindowImplDirectFB *impl;
   GdkCursor             *old_cursor;
@@ -2012,7 +2044,7 @@
 }
 
 void
-gdk_window_get_geometry (GdkWindow *window,
+gdk_window_directfb_get_geometry (GdkWindow *window,
                          gint      *x,
                          gint      *y,
                          gint      *width,
@@ -2079,9 +2111,9 @@
 }
 
 gboolean
-gdk_window_get_origin (GdkWindow *window,
-                       gint      *x,
-                       gint      *y)
+gdk_window_directfb_get_origin (GdkWindow *window,
+					           gint      *x,
+					           gint      *y)
 {
   g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
 
@@ -2107,7 +2139,7 @@
                                     gint      *x,
                                     gint      *y)
 {
-  return gdk_window_get_origin (window, x, y);
+  return gdk_window_directfb_get_origin (window, x, y);
 }
 
 void
@@ -2216,7 +2248,7 @@
 }
 
 GdkEventMask
-gdk_window_get_events (GdkWindow *window)
+gdk_window_directfb_get_events (GdkWindow *window)
 {
   g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
 
@@ -2227,8 +2259,8 @@
 }
 
 void
-gdk_window_set_events (GdkWindow    *window,
-                       GdkEventMask  event_mask)
+gdk_window_directfb_set_events (GdkWindow    *window,
+                   				GdkEventMask  event_mask)
 {
   g_return_if_fail (GDK_IS_WINDOW (window));
 
@@ -2241,10 +2273,10 @@
 }
 
 void
-gdk_window_shape_combine_mask (GdkWindow *window,
-                               GdkBitmap *mask,
-                               gint       x,
-                               gint       y)
+gdk_window_directfb_shape_combine_mask (GdkWindow *window,
+				                       GdkBitmap *mask,
+				                       gint       x,
+				                       gint       y)
 {
 }
 
@@ -2257,10 +2289,10 @@
 }
 
 void
-gdk_window_shape_combine_region (GdkWindow       *window,
-                                 const GdkRegion *shape_region,
-                                 gint             offset_x,
-                                 gint             offset_y)
+gdk_window_directfb_shape_combine_region (GdkWindow       *window,
+				                         const GdkRegion *shape_region,
+				                         gint             offset_x,
+				                         gint             offset_y)
 {
 }
 
@@ -2330,7 +2362,7 @@
   if (GDK_WINDOW_DESTROYED (window))
     return;
 
-  gdk_window_hide (window);
+  gdk_window_directfb_hide (window);
 }
 
 void
@@ -2341,7 +2373,7 @@
   if (GDK_WINDOW_DESTROYED (window))
     return;
 
-  gdk_window_show (window);
+  _gdk_window_directfb_show_raised (window);
 }
 
 void
@@ -2585,12 +2617,12 @@
 }
 
 void
-gdk_window_set_child_shapes (GdkWindow *window)
+gdk_window_directfb_set_child_shapes (GdkWindow *window)
 {
 }
 
 void
-gdk_window_merge_child_shapes (GdkWindow *window)
+gdk_window_directfb_merge_child_shapes (GdkWindow *window)
 {
 }
 
@@ -2605,8 +2637,8 @@
 }
 
 gboolean
-gdk_window_set_static_gravities (GdkWindow *window,
-                                 gboolean   use_static)
+gdk_window_directfb_set_static_gravities (GdkWindow *window,
+                             			gboolean   use_static)
 {
   g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
 
@@ -2708,6 +2740,8 @@
 
   window = g_object_new (GDK_TYPE_WINDOW, NULL);
   private = GDK_WINDOW_OBJECT (window);
+  private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
+  D_DEBUG_AT( GDKDFB_Window, "DFB:%s:allocating window impl\n", __FUNCTION__);
   parent_private = GDK_WINDOW_OBJECT (parent);
   parent_impl = GDK_WINDOW_IMPL_DIRECTFB (parent_private->impl);
   private->parent = parent_private;
@@ -2731,7 +2765,7 @@
   private->depth = parent_private->depth;
   gdk_drawable_set_colormap (GDK_DRAWABLE (window),
         gdk_drawable_get_colormap (parent));
-  gdk_window_set_cursor (window, NULL);
+  gdk_window_directfb_set_cursor (window, NULL);
   parent_private->children = g_list_prepend (parent_private->children,window);
   /*we hold a reference count on ourselves */
   g_object_ref (window);
@@ -2787,6 +2821,8 @@
     /* we hold a reference count on ourselves */
     g_object_ref (window);
     private = GDK_WINDOW_OBJECT (window);
+    private->impl = g_object_new (_gdk_window_impl_get_type (), NULL);
+    D_DEBUG_AT( GDKDFB_Window, "DFB:%s:allocating window impl\n", __FUNCTION__);
     private->parent = parent_private;
     private->window_type = GDK_WINDOW_TOPLEVEL;
     impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
@@ -2812,7 +2848,7 @@
     /* We default to all events least surprise to the user 
      * minus the poll for motion events 
      */
-    gdk_window_set_events (window, (GDK_ALL_EVENTS_MASK ^ GDK_POINTER_MOTION_HINT_MASK));
+    gdk_window_directfb_set_events (window, (GDK_ALL_EVENTS_MASK ^ GDK_POINTER_MOTION_HINT_MASK));
 
     if (impl->drawable.surface)
     {
@@ -2829,7 +2865,7 @@
     //can  be null for the soft cursor window itself when
     //running a gtk directfb wm
     if( gdk_display_get_default() != NULL ) {
-        gdk_window_set_cursor (window,NULL);
+        gdk_window_directfb_set_cursor (window,NULL);
     }
 
     if (parent_private)
@@ -3153,11 +3189,11 @@
 
       D_DEBUG_AT( GDKDFB_Window, "  -> [%2d] %4d,%4d-%4dx%4d\n", i, GDKDFB_RECTANGLE_VALS_FROM_BOX( box ) );
 
-      _gdk_windowing_window_clear_area (GDK_WINDOW(wimpl->gdkWindow),
+      gdk_window_directfb_clear_area (GDK_WINDOW(wimpl->gdkWindow),
                                         box->x1,
-                                        box->y1,
+										box->y1,
                                         box->x2 - box->x1,
-                                        box->y2 - box->y1);
+                                        box->y2 - box->y1, TRUE);
     }
 }
 
@@ -3255,7 +3291,7 @@
 
 void
 gdk_window_set_opacity (GdkWindow *window,
-			gdouble    opacity)
+						gdouble    opacity)
 {
   GdkDisplay *display;
   guint8 cardinal;
@@ -3282,6 +3318,35 @@
 }
 
 
+static void
+gdk_window_impl_iface_init (GdkWindowImplIface *iface)
+{
+  iface->show = gdk_window_directfb_show;
+  iface->hide = gdk_window_directfb_hide;
+  iface->withdraw = gdk_window_directfb_withdraw;
+  iface->set_events = gdk_window_directfb_set_events;
+  iface->get_events = gdk_window_directfb_get_events;
+  iface->clear_area = gdk_window_directfb_clear_area;
+  iface->raise = gdk_window_directfb_raise;
+  iface->lower = gdk_window_directfb_lower;
+  iface->move_resize = gdk_window_directfb_move_resize;
+  iface->scroll = _gdk_window_directfb_scroll;
+  iface->move_region = _gdk_window_directfb_move_region;
+  iface->set_background = gdk_window_directfb_set_background;
+  iface->set_back_pixmap = gdk_window_directfb_set_back_pixmap;
+  iface->reparent = gdk_window_directfb_reparent;
+  iface->set_cursor = gdk_window_directfb_set_cursor;
+  iface->get_geometry = gdk_window_directfb_get_geometry;
+  iface->get_origin = gdk_window_directfb_get_origin;
+  iface->shape_combine_mask = gdk_window_directfb_shape_combine_mask;
+  iface->shape_combine_region = gdk_window_directfb_shape_combine_region;
+  iface->set_child_shapes = gdk_window_directfb_set_child_shapes;
+  iface->merge_child_shapes = gdk_window_directfb_merge_child_shapes;
+  iface->set_static_gravities = gdk_window_directfb_set_static_gravities;
+  iface->get_offsets = _gdk_window_directfb_get_offsets;
+}
+
+
 #define __GDK_WINDOW_X11_C__
 #include "gdkaliasdef.c"
 
