diff --git a/src/handlers.c b/src/handlers.c index 383207f8..209422d4 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -580,14 +580,14 @@ int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_noti 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);