]> git.sur5r.net Git - i3/i3/commit
Don't refocus a workspace cleaned up by `workspace_show` during rename
authorOliver Graff <oliver.e.graff@gmail.com>
Tue, 1 May 2018 08:25:13 +0000 (04:25 -0400)
committerOrestis <orestisf1993@gmail.com>
Tue, 1 May 2018 08:25:13 +0000 (11:25 +0300)
commit252db3b8cfad6aa3c9cf22f51eb2a585ae69c791
treec3e2fb5ec18a7f0034235a3d19e8046e728e3ad0
parente8057b2fbc5e60384f88a0e9cf09dc91c49c7294
Don't refocus a workspace cleaned up by `workspace_show` during rename

When moving a workspace to the current output by way of a rename, if the
current workspace is empty, it will be removed by `workspace_show`.
Attempting to restore focus to this removed workspace causes a crash.
Follow the pattern in workspace.c:996 to only restore the original focus if the
original workspace still exists.

Add a test to ensure that the renamed workspace moves to its appropriate
output and that a crash does not occur.

Fixes #3228
src/commands.c
testcases/t/522-rename-assigned-workspace.t