]> git.sur5r.net Git - i3/i3/commitdiff
Merge branch 'master' into next
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 7 Jan 2012 18:50:46 +0000 (18:50 +0000)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 7 Jan 2012 18:50:46 +0000 (18:50 +0000)
1  2 
src/con.c

diff --combined src/con.c
index f90d569f61c09717396705470c51cc46443b7a3b,c901c18d6be0de78d6bbc85a5224dcf84e74f024..ded8d7bf0596859aedc47f872c634d552267a31d
+++ b/src/con.c
@@@ -657,10 -657,8 +657,10 @@@ void con_move_to_workspace(Con *con, Co
  
      /* 7: focus the con on the target workspace (the X focus is only updated by
       * calling tree_render(), so for the "real" focus this is a no-op).
 -     * We don’t focus when there is a fullscreen con on that workspace. */
 -    if (con_get_fullscreen_con(workspace, CF_OUTPUT) == NULL)
 +     * We don’t focus the con for i3 pseudo workspaces like __i3_scratch and
 +     * we don’t focus when there is a fullscreen con on that workspace. */
 +    if ((workspace->name[0] != '_' || workspace->name[1] != '_') &&
 +        con_get_fullscreen_con(workspace, CF_OUTPUT) == NULL)
          con_focus(con_descend_focused(con));
  
      /* 8: when moving to a visible workspace on a different output, we keep the
@@@ -810,7 -808,7 +810,7 @@@ Con *con_get_next(Con *con, char way, o
   */
  Con *con_descend_focused(Con *con) {
      Con *next = con;
-     while (!TAILQ_EMPTY(&(next->focus_head)))
+     while (next != focused && !TAILQ_EMPTY(&(next->focus_head)))
          next = TAILQ_FIRST(&(next->focus_head));
      return next;
  }
@@@ -827,6 -825,8 +827,8 @@@ Con *con_descend_tiling_focused(Con *co
      Con *next = con;
      Con *before;
      Con *child;
+     if (next == focused)
+         return next;
      do {
          before = next;
          TAILQ_FOREACH(child, &(next->focus_head), focused) {
              next = child;
              break;
          }
-     } while (before != next);
+     } while (before != next && next != focused);
      return next;
  }