diff --git a/src/client.c b/src/client.c
index 98519fe2cc6a67042e1046d9a6e7326fa0a96a98..cb17b66cdda7cd5dddc95d1e09be042ee6a4eba7 100644
--- a/src/client.c
+++ b/src/client.c
@@ -1426,8 +1426,8 @@ clientFrame (DisplayInfo *display_info, Window w, gboolean recapture)
                 "(unknown)");
     if (attr.map_state != IsUnmapped)
     {
+        /* Reparent will send us unmap/map events */
         FLAG_SET (c->flags, CLIENT_FLAG_MAP_PENDING);
-        XUnmapWindow (display_info->dpy, c->window);
     }
 
     c->ignore_unmap = 0;
@@ -1628,6 +1628,7 @@ clientUnframe (Client * c, gboolean remap)
         }
         else
         {
+            XUnmapWindow (display_info->dpy, c->window);
             setWMState (display_info->dpy, c->window, WithdrawnState);
         }
     }