i3 - improved tiling WM


fix a focus problem when hiding a scratchpad

Patch status: needinfo

Patch by Adrien Schildknecht

Long description:

When a scratchpad becomes hidden, i3 tries to focus a floating windows instead
of the last focused.

To apply this patch, use:
curl http://cr.i3wm.org/patch/87/raw.patch | git am

b/src/con.c

15
@@ -855,7 +855,7 @@ Con *con_next_focused(Con *con) {
16
     Con *next;
17
     /* floating containers are attached to a workspace, so we focus either the
18
      * next floating container (if any) or the workspace itself. */
19
-    if (con->type == CT_FLOATING_CON) {
20
+    if (con->type == CT_FLOATING_CON && con->scratchpad_state == SCRATCHPAD_NONE) {
21
         DLOG("selecting next for CT_FLOATING_CON\n");
22
         next = TAILQ_NEXT(con, floating_windows);
23
         DLOG("next = %p\n", next);