From: Michael Stapelberg Date: Fri, 25 Jan 2013 15:10:37 +0000 (+0100) Subject: Call scratchpad_show() when focusing scratchpad windows via criteria X-Git-Tag: 4.5~41 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=74558bb33d1a4d6d66cda91bf0cce9b7434f3196;p=i3%2Fi3 Call scratchpad_show() when focusing scratchpad windows via criteria fixes #931 --- diff --git a/src/commands.c b/src/commands.c index 323c5ae4..f39f311a 100644 --- a/src/commands.c +++ b/src/commands.c @@ -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