diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index c601ec8..bbbc6d9 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -32,6 +32,7 @@
 #include "gdk.h"		/* For gdk_rectangle_union() */
 #include "gdkpixmap.h"
 #include "gdkdrawable.h"
+#include "gdkintl.h"
 #include "gdkscreen.h"
 #include "gdkmarshalers.h"
 #include "gdkalias.h"
@@ -128,6 +129,11 @@ enum {
   LAST_SIGNAL
 };
 
+enum {
+  PROP_0,
+  PROP_CURSOR
+};
+
 struct _GdkWindowPaint
 {
   GdkRegion *region;
@@ -293,6 +299,16 @@ static void gdk_window_free_paint_stack (GdkWindow *window);
 static void gdk_window_init       (GdkWindowObject      *window);
 static void gdk_window_class_init (GdkWindowObjectClass *klass);
 static void gdk_window_finalize   (GObject              *object);
+
+static void gdk_window_set_property (GObject      *object,
+                                     guint         prop_id,
+                                     const GValue *value,
+                                     GParamSpec   *pspec);
+static void gdk_window_get_property (GObject      *object,
+                                     guint         prop_id,
+                                     GValue       *value,
+                                     GParamSpec   *pspec);
+
 static void gdk_window_clear_backing_region (GdkWindow *window,
 					     GdkRegion *region);
 static void gdk_window_redirect_free      (GdkWindowRedirect *redirect);
@@ -410,6 +426,8 @@ gdk_window_class_init (GdkWindowObjectClass *klass)
   parent_class = g_type_class_peek_parent (klass);
 
   object_class->finalize = gdk_window_finalize;
+  object_class->set_property = gdk_window_set_property;
+  object_class->get_property = gdk_window_get_property;
 
   drawable_class->create_gc = gdk_window_create_gc;
   drawable_class->draw_rectangle = gdk_window_draw_rectangle;
@@ -444,6 +462,14 @@ gdk_window_class_init (GdkWindowObjectClass *klass)
   quark_pointer_window = g_quark_from_static_string ("gtk-pointer-window");
 
 
+  /* Properties */
+  g_object_class_install_property (object_class,
+                                   PROP_CURSOR,
+                                   g_param_spec_pointer ("cursor",
+                                                         P_("Cursor"),
+                                                         P_("Cursor"),
+                                                         G_PARAM_READWRITE));
+
   /**
    * GdkWindow::pick-embedded-child:
    * @window: the window on which the signal is emitted
@@ -568,6 +594,46 @@ gdk_window_finalize (GObject *object)
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
+static void
+gdk_window_set_property (GObject      *object,
+                         guint         prop_id,
+                         const GValue *value,
+                         GParamSpec   *pspec)
+{
+  GdkWindow *window = (GdkWindow *)object;
+
+  switch (prop_id)
+    {
+    case PROP_CURSOR:
+      gdk_window_set_cursor (window, g_value_get_pointer (value));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
+static void
+gdk_window_get_property (GObject    *object,
+                         guint       prop_id,
+                         GValue     *value,
+                         GParamSpec *pspec)
+{
+  GdkWindow *window = (GdkWindow *) object;
+
+  switch (prop_id)
+    {
+    case PROP_CURSOR:
+      g_value_set_pointer (value, gdk_window_get_cursor (window));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      break;
+    }
+}
+
 static gboolean
 gdk_window_is_offscreen (GdkWindowObject *window)
 {
@@ -6894,6 +6960,30 @@ gdk_window_set_back_pixmap (GdkWindow *window,
 }
 
 /**
+ * gdk_window_get_cursor:
+ * @window: a #GdkWindow
+ * @cursor: a cursor
+ *
+ * Retrieves a #GdkCursor pointer for the cursor currently set on the
+ * specified #GdkWindow, or %NULL.  If the return value is %NULL then
+ * there is no custom cursor set on the specified window, and it is
+ * using the cursor for its parent window.
+ *
+ * Since: 2.18
+ */
+GdkCursor *
+gdk_window_get_cursor (GdkWindow *window)
+{
+  GdkWindowObject *private;
+
+  g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
+
+  private = (GdkWindowObject *) window;
+
+  return private->cursor;
+}
+
+/**
  * gdk_window_set_cursor:
  * @window: a #GdkWindow
  * @cursor: a cursor
@@ -6929,6 +7019,8 @@ gdk_window_set_cursor (GdkWindow *window,
 
       if (_gdk_window_event_parent_of (window, display->pointer_info.window_under_pointer))
 	update_cursor (display);
+
+      g_object_notify (G_OBJECT (window), "cursor");
     }
 }
 
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index a1d3184..a3297d2 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -517,6 +517,7 @@ void	      gdk_window_set_back_pixmap (GdkWindow	  *window,
 					  gboolean	   parent_relative);
 void	      gdk_window_set_cursor	 (GdkWindow	  *window,
 					  GdkCursor	  *cursor);
+GdkCursor    *gdk_window_get_cursor      (GdkWindow       *window);
 void	      gdk_window_get_user_data	 (GdkWindow	  *window,
 					  gpointer	  *data);
 void	      gdk_window_get_geometry	 (GdkWindow	  *window,
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 39f9a1e..ed7a0ae 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -229,6 +229,8 @@ struct _GtkWindowPrivate
   gint cursor_region;
 
   GtkWidget *popup_menu;
+
+  GdkCursor *default_cursor;
 };
 
 static void gtk_window_dispose            (GObject           *object);
@@ -258,8 +260,6 @@ static gboolean gtk_window_button_press_event (GtkWidget      *widget,
                                                GdkEventButton *event);
 static gint gtk_window_enter_notify_event (GtkWidget         *widget,
 					   GdkEventCrossing  *event);
-static gint gtk_window_leave_notify_event (GtkWidget         *widget,
-					   GdkEventCrossing  *event);
 static gboolean gtk_window_motion_notify_event (GtkWidget    *widget,
                                                 GdkEventMotion *event);
 static gint gtk_window_focus_in_event     (GtkWidget         *widget,
@@ -348,6 +348,10 @@ static gboolean    gtk_window_popup_menu       (GtkWidget      *widget);
 static void        gtk_window_do_popup         (GtkWindow      *window,
                                                 GdkEventButton *event);
 
+static void        window_cursor_changed       (GdkWindow  *window,
+                                                GParamSpec *pspec,
+                                                GtkWidget  *widget);
+
 static GSList      *toplevel_list = NULL;
 static guint        window_signals[LAST_SIGNAL] = { 0 };
 static GList       *default_icon_list = NULL;
@@ -509,7 +513,6 @@ gtk_window_class_init (GtkWindowClass *klass)
   widget_class->key_press_event = gtk_window_key_press_event;
   widget_class->key_release_event = gtk_window_key_release_event;
   widget_class->enter_notify_event = gtk_window_enter_notify_event;
-  widget_class->leave_notify_event = gtk_window_leave_notify_event;
   widget_class->motion_notify_event = gtk_window_motion_notify_event;
   widget_class->focus_in_event = gtk_window_focus_in_event;
   widget_class->focus_out_event = gtk_window_focus_out_event;
@@ -5203,6 +5206,8 @@ is_client_side_decorated (GtkWindow *window)
                         "client-side-decorated", &client_side_decorated,
                         NULL);
 
+  return TRUE;
+
   return client_side_decorated;
 }
 
@@ -5369,6 +5374,12 @@ gtk_window_realize (GtkWidget *widget)
         gdk_window_set_startup_id (widget->window, priv->startup_id);
     }
 
+  /* get the default cursor */
+  priv->default_cursor = gdk_window_get_cursor (widget->window);
+  g_signal_connect (G_OBJECT (widget->window), "notify::cursor",
+                    G_CALLBACK (window_cursor_changed),
+                    widget);
+
   /* Icons */
   gtk_window_realize_icon (window);
 }
@@ -6131,6 +6142,16 @@ get_resize_info (GtkWindow *window,
 }
 
 static void
+window_cursor_changed (GdkWindow  *window,
+                       GParamSpec *pspec,
+                       GtkWidget  *widget)
+{
+  GtkWindowPrivate *priv = GTK_WINDOW_GET_PRIVATE (widget);
+
+  priv->default_cursor = gdk_window_get_cursor (window);
+}
+
+static void
 update_cursor_at_position (GtkWidget *widget, gint x, gint y)
 {
   GtkWindow *window = GTK_WINDOW (widget);
@@ -6139,6 +6160,7 @@ update_cursor_at_position (GtkWidget *widget, gint x, gint y)
   GdkCursorType cursor_type;
   GdkCursor *cursor;
   GdkWindowState state;
+  gboolean use_default = FALSE;
 
   region = get_active_region_type (window, x, y);
 
@@ -6149,7 +6171,7 @@ update_cursor_at_position (GtkWidget *widget, gint x, gint y)
 
   if ((state & GDK_WINDOW_STATE_MAXIMIZED) || !window->allow_grow)
     {
-      cursor_type = GDK_ARROW;
+      use_default = TRUE;
     }
   else
     {
@@ -6188,13 +6210,28 @@ update_cursor_at_position (GtkWidget *widget, gint x, gint y)
           break;
 
         default:
-          cursor_type = GDK_ARROW;
+          use_default = TRUE;
           break;
         }
     }
 
-  cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), cursor_type);
-  gdk_window_set_cursor (widget->window, cursor);
+  g_signal_handlers_disconnect_by_func (G_OBJECT (widget->window),
+                                        G_CALLBACK (window_cursor_changed),
+                                        widget);
+
+  if (use_default)
+    {
+      gdk_window_set_cursor (widget->window, priv->default_cursor);
+    }
+  else
+    {
+      cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), cursor_type);
+      gdk_window_set_cursor (widget->window, cursor);
+    }
+
+  g_signal_connect (G_OBJECT (widget->window), "notify::cursor",
+                    G_CALLBACK (window_cursor_changed),
+                    widget);
 }
 
 static gint
@@ -6221,17 +6258,6 @@ gtk_window_enter_notify_event (GtkWidget        *widget,
   return FALSE;
 }
 
-static gint
-gtk_window_leave_notify_event (GtkWidget        *widget,
-			       GdkEventCrossing *event)
-{
-  GdkCursor *cursor = gdk_cursor_new (GDK_ARROW);
-
-  gdk_window_set_cursor (widget->window, cursor);
-
-  return FALSE;
-}
-
 static gboolean
 gtk_window_motion_notify_event (GtkWidget       *widget,
                                 GdkEventMotion  *event)
