Bugfix: Remove/add floating clients to workspace->floating_clients when moving to other workspaces

This commit is contained in:
Michael Stapelberg 2009-06-23 23:17:06 +02:00
parent 81e9d8282a
commit 0aed552bae

View File

@ -452,15 +452,17 @@ static void move_floating_window_to_workspace(xcb_connection_t *conn, Client *cl
} }
} }
/* Remove from focus stack */ /* Remove from focus stack and list of floating clients */
SLIST_REMOVE(&(client->workspace->focus_stack), client, Client, focus_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) if (client->workspace->fullscreen_client == client)
client->workspace->fullscreen_client = NULL; client->workspace->fullscreen_client = NULL;
/* Insert into destination focus stack */ /* Insert into destination focus stack and list of floating clients */
client->workspace = t_ws; client->workspace = t_ws;
SLIST_INSERT_HEAD(&(t_ws->focus_stack), client, focus_clients); SLIST_INSERT_HEAD(&(t_ws->focus_stack), client, focus_clients);
TAILQ_INSERT_TAIL(&(t_ws->floating_clients), client, floating_clients);
if (client->fullscreen) if (client->fullscreen)
t_ws->fullscreen_client = client; t_ws->fullscreen_client = client;