Bugfix: Re-assign dock windows to different workspaces when a workspace is deleted

Killing a dock client and having destroyed workspace 1 before (or the workspace
on which the dock client was started when it was not auto-started) crashed i3 before
this bugfix.
This commit is contained in:
Michael Stapelberg
2009-05-16 18:12:35 +02:00
parent e79cca8f72
commit d5d44e66a2
3 changed files with 25 additions and 6 deletions

View File

@ -547,11 +547,12 @@ void show_workspace(xcb_connection_t *conn, int workspace) {
}
t_ws->screen->current_workspace = workspace-1;
/* Unmap all clients of the current workspace */
unmap_workspace(conn, c_ws);
Workspace *old_workspace = c_ws;
c_ws = &workspaces[workspace-1];
/* Unmap all clients of the old workspace */
unmap_workspace(conn, old_workspace);
current_row = c_ws->current_row;
current_col = c_ws->current_col;
LOG("new current row = %d, current col = %d\n", current_row, current_col);