diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index f5f0339..138d06d 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -5309,9 +5309,13 @@ gdk_window_add_update_window (GdkWindow *window)
 }
 
 static void
-gdk_window_remove_update_window (GdkWindow *window)
+gdk_window_remove_update_window (GdkWindow *window,
+                                 gboolean   all)
 {
-  update_windows = g_slist_remove (update_windows, window);
+  if (all)
+    update_windows = g_slist_remove_all (update_windows, window);
+  else
+    update_windows = g_slist_remove (update_windows, window);
 }
 
 static gboolean
@@ -5766,7 +5770,7 @@ gdk_window_process_updates (GdkWindow *window,
       impl_window->implicit_paint == NULL)
     {
       gdk_window_process_updates_internal ((GdkWindow *)impl_window);
-      gdk_window_remove_update_window ((GdkWindow *)impl_window);
+      gdk_window_remove_update_window ((GdkWindow *)impl_window, FALSE);
     }
 
   if (update_children)
@@ -6186,7 +6190,7 @@ gdk_window_get_update_area (GdkWindow *window)
 	      gdk_region_destroy (impl_window->update_area);
 	      impl_window->update_area = NULL;
 
-	      gdk_window_remove_update_window ((GdkWindow *)impl_window);
+	      gdk_window_remove_update_window ((GdkWindow *)impl_window, FALSE);
 	    }
 
 	  /* Convert from impl coords */
@@ -6215,7 +6219,7 @@ _gdk_window_clear_update_area (GdkWindow *window)
 
   if (private->update_area)
     {
-      gdk_window_remove_update_window (window);
+      gdk_window_remove_update_window (window, TRUE);
 
       gdk_region_destroy (private->update_area);
       private->update_area = NULL;
