client = table_remove(&by_child, event->window);
- if (client->name != NULL)
- free(client->name);
-
/* Clients without a container are either floating or dock windows */
if (client->container != NULL) {
Container *con = client->container;
client->workspace->screen = NULL;
}
+ FREE(client->window_class);
+ FREE(client->name);
free(client);
render_layout(conn);
if (client->workspace->screen == (screen = get_screen_containing(client->rect.x, client->rect.y)))
return;
+ if (screen == NULL) {
+ LOG("Boundary checking disabled, no screen found for (%d, %d)\n", client->rect.x, client->rect.y);
+ return;
+ }
+
LOG("Client is on workspace %p with screen %p\n", client->workspace, client->workspace->screen);
LOG("but screen at %d, %d is %p\n", client->rect.x, client->rect.y, screen);
floating_assign_to_workspace(client, &workspaces[screen->current_workspace]);