floating_assign_to_workspace(client, t_ws);
+ bool target_invisible = t_ws->screen->current_workspace != t_ws->num;
+
/* If we’re moving it to an invisible screen, we need to unmap it */
- if (t_ws->screen->current_workspace != t_ws->num) {
+ if (target_invisible) {
LOG("This workspace is not visible, unmapping\n");
xcb_unmap_window(conn, client->frame);
} else {
render_layout(conn);
- set_focus(conn, client, true);
+ if (!target_invisible)
+ set_focus(conn, client, true);
}
/*
if ((con->currently_focused != NULL) && ((con == CUR_CELL) || client->fullscreen))
set_focus(conn, con->currently_focused, true);
} else if (client_is_floating(client)) {
+ LOG("Removing from floating clients\n");
+ TAILQ_REMOVE(&(client->workspace->floating_clients), client, floating_clients);
SLIST_REMOVE(&(client->workspace->focus_stack), client, Client, focus_clients);
}
SLIST_REMOVE(&(client->workspace->screen->dock_clients), client, Client, dock_clients);
}
- if (client->floating) {
- LOG("Removing from floating clients\n");
- TAILQ_REMOVE(&(client->workspace->floating_clients), client, floating_clients);
- }
-
LOG("child of 0x%08x.\n", client->frame);
xcb_reparent_window(conn, client->child, root, 0, 0);
xcb_destroy_window(conn, client->frame);
int unmapped_clients = 0;
FOR_TABLE(u_ws)
CIRCLEQ_FOREACH(client, &(u_ws->table[cols][rows]->clients), clients) {
+ LOG("unmapping normal client %p / %p / %p\n", client, client->frame, client->child);
xcb_unmap_window(conn, client->frame);
unmapped_clients++;
}
if (!client_is_floating(client))
continue;
+ LOG("unmapping floating client %p / %p / %p\n", client, client->frame, client->child);
+
xcb_unmap_window(conn, client->frame);
unmapped_clients++;
}