Bugfix: Correctly handle 'move scratchpad' on workspace level (+test) (Thanks mseed)

Fixes: #597
This commit is contained in:
Michael Stapelberg
2012-01-07 17:36:30 +00:00
parent 3254188cda
commit 0e1b1dd984
2 changed files with 60 additions and 0 deletions

View File

@ -17,6 +17,18 @@
*
*/
void scratchpad_move(Con *con) {
if (con->type == CT_WORKSPACE) {
LOG("'move scratchpad' used on a workspace \"%s\". Calling it "
"recursively on all windows on this workspace.\n", con->name);
Con *current;
current = TAILQ_FIRST(&(con->focus_head));
while (current) {
Con *next = TAILQ_NEXT(current, focused);
scratchpad_move(current);
current = next;
}
return;
}
DLOG("should move con %p to __i3_scratch\n", con);
Con *__i3_scratch = workspace_get("__i3_scratch", NULL);