+ /* When dealing with fullscreen containers, it's necessary to go up to the
+ * workspace level, because 'focus $dir' will start at the con's real
+ * position in the tree, and it may not be possible to get to the edge
+ * normally due to fullscreen focusing restrictions. */
+ if (con->fullscreen_mode == CF_OUTPUT && con->type != CT_WORKSPACE)
+ con = con_get_workspace(con);
+