Remove unused con_get_next()

This function has unused for a long time since the commit
8f4b9ddaa4.
next
Albert Safin 2018-12-09 06:15:53 +07:00
parent 0eb07dea5c
commit b6282b47bc
2 changed files with 0 additions and 43 deletions

View File

@ -378,13 +378,6 @@ orientation_t con_orientation(Con *con);
*/
Con *con_next_focused(Con *con);
/**
* Get the next/previous container in the specified orientation. This may
* travel up until it finds a container with suitable orientation.
*
*/
Con *con_get_next(Con *con, char way, orientation_t orientation);
/**
* Returns the focused con inside this client, descending the tree as far as
* possible. This comes in handy when attaching a con to a workspace at the

View File

@ -1485,42 +1485,6 @@ Con *con_next_focused(Con *con) {
return next;
}
/*
* Get the next/previous container in the specified orientation. This may
* travel up until it finds a container with suitable orientation.
*
*/
Con *con_get_next(Con *con, char way, orientation_t orientation) {
DLOG("con_get_next(way=%c, orientation=%d)\n", way, orientation);
/* 1: get the first parent with the same orientation */
Con *cur = con;
while (con_orientation(cur->parent) != orientation) {
DLOG("need to go one level further up\n");
if (cur->parent->type == CT_WORKSPACE) {
LOG("that's a workspace, we can't go further up\n");
return NULL;
}
cur = cur->parent;
}
/* 2: chose next (or previous) */
Con *next;
if (way == 'n') {
next = TAILQ_NEXT(cur, nodes);
/* if we are at the end of the list, we need to wrap */
if (next == TAILQ_END(&(parent->nodes_head)))
return NULL;
} else {
next = TAILQ_PREV(cur, nodes_head, nodes);
/* if we are at the end of the list, we need to wrap */
if (next == TAILQ_END(&(cur->nodes_head)))
return NULL;
}
DLOG("next = %p\n", next);
return next;
}
/*
* Returns the focused con inside this client, descending the tree as far as
* possible. This comes in handy when attaching a con to a workspace at the