Correctly re-assign floating clients to the destination workspace when moving

This commit is contained in:
Michael Stapelberg
2009-06-24 17:12:12 +02:00
parent 7ed967c96f
commit 07bebdf841
4 changed files with 47 additions and 14 deletions

View File

@ -453,19 +453,7 @@ static void move_floating_window_to_workspace(xcb_connection_t *conn, Client *cl
}
}
/* Remove from focus stack and list of floating clients */
SLIST_REMOVE(&(client->workspace->focus_stack), client, Client, focus_clients);
TAILQ_REMOVE(&(client->workspace->floating_clients), client, floating_clients);
if (client->workspace->fullscreen_client == client)
client->workspace->fullscreen_client = NULL;
/* Insert into destination focus stack and list of floating clients */
client->workspace = t_ws;
SLIST_INSERT_HEAD(&(t_ws->focus_stack), client, focus_clients);
TAILQ_INSERT_TAIL(&(t_ws->floating_clients), client, floating_clients);
if (client->fullscreen)
t_ws->fullscreen_client = client;
floating_assign_to_workspace(client, t_ws);
/* If were moving it to an invisible screen, we need to unmap it */
if (t_ws->screen->current_workspace != t_ws->num) {