Call scratchpad_show() when focusing scratchpad windows via criteria

fixes #931
next
Michael Stapelberg 2013-01-25 16:10:37 +01:00
parent 2ea94420d3
commit 74558bb33d
1 changed files with 11 additions and 0 deletions

View File

@ -1410,6 +1410,7 @@ void cmd_focus(I3_CMD) {
return;
}
Con *__i3_scratch = workspace_get("__i3_scratch", NULL);
int count = 0;
owindow *current;
TAILQ_FOREACH(current, &owindows, owindows) {
@ -1426,6 +1427,16 @@ void cmd_focus(I3_CMD) {
return;
}
/* In case this is a scratchpad window, call scratchpad_show(). */
if (ws == __i3_scratch) {
scratchpad_show(current->con);
count++;
/* While for the normal focus case we can change focus multiple
* times and only a single window ends up focused, we could show
* multiple scratchpad windows. So, rather break here. */
break;
}
/* If the container is not on the current workspace,
* workspace_show() will switch to a different workspace and (if
* enabled) trigger a mouse pointer warp to the currently focused