# Calculate format=diff
diff --git a/openbox/event.c b/openbox/event.c
index 5774f67..1ea11fb 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -1391,6 +1391,7 @@ static void event_handle_client(ObClient *client, XEvent *e)
         break;
     case MapRequest:
         ob_debug("MapRequest for 0x%lx", client->window);
+        client_set_desktop(client, screen_desktop, FALSE, TRUE);
         if (!client->iconic) break; /* this normally doesn't happen, but if it
                                        does, we don't want it!
                                        it can happen now when the window is on
