client = table_remove(&by_child, event->window);
+ /* If this was the fullscreen client, we need to unset it */
+ if (client->fullscreen)
+ client->workspace->fullscreen_client = NULL;
+
/* Clients without a container are either floating or dock windows */
if (client->container != NULL) {
Container *con = client->container;
- /* If this was the fullscreen client, we need to unset it */
- if (client->fullscreen)
- con->workspace->fullscreen_client = NULL;
-
/* Remove the client from the list of clients */
client_remove_from_container(conn, client, con, true);