Bugfix: Correctly remove client from container when moving to another workspace
This fixes ticket #16
This commit is contained in:
@ -219,6 +219,7 @@ static void move_current_window(xcb_connection_t *conn, direction_t direction) {
|
||||
/* Remove it from the old container and put it into the new one */
|
||||
remove_client_from_container(conn, current_client, container);
|
||||
CIRCLEQ_INSERT_TAIL(&(new->clients), current_client, clients);
|
||||
SLIST_INSERT_HEAD(&(new->workspace->focus_stack), current_client, focus_clients);
|
||||
|
||||
/* Update data structures */
|
||||
current_client->container = new;
|
||||
@ -424,8 +425,7 @@ static void move_current_window_to_workspace(xcb_connection_t *conn, int workspa
|
||||
|
||||
assert(to_container != NULL);
|
||||
|
||||
CIRCLEQ_REMOVE(&(container->clients), current_client, clients);
|
||||
SLIST_REMOVE(&(container->workspace->focus_stack), current_client, Client, focus_clients);
|
||||
remove_client_from_container(conn, current_client, container);
|
||||
|
||||
CIRCLEQ_INSERT_TAIL(&(to_container->clients), current_client, clients);
|
||||
SLIST_INSERT_HEAD(&(to_container->workspace->focus_stack), current_client, focus_clients);
|
||||
|
Reference in New Issue
Block a user