traverse numbered workspaces in correct order
This commit is contained in:
parent
b668d62cfc
commit
d979748853
|
@ -544,7 +544,7 @@ Con *workspace_next(void) {
|
||||||
NODES_FOREACH(output_get_content(output)) {
|
NODES_FOREACH(output_get_content(output)) {
|
||||||
if (child->type != CT_WORKSPACE)
|
if (child->type != CT_WORKSPACE)
|
||||||
continue;
|
continue;
|
||||||
if (!first)
|
if (!first || (child->num != -1 && child->num < first->num))
|
||||||
first = child;
|
first = child;
|
||||||
if (!first_opposite && child->num == -1)
|
if (!first_opposite && child->num == -1)
|
||||||
first_opposite = child;
|
first_opposite = child;
|
||||||
|
@ -610,7 +610,7 @@ Con *workspace_prev(void) {
|
||||||
NODES_FOREACH_REVERSE(output_get_content(output)) {
|
NODES_FOREACH_REVERSE(output_get_content(output)) {
|
||||||
if (child->type != CT_WORKSPACE)
|
if (child->type != CT_WORKSPACE)
|
||||||
continue;
|
continue;
|
||||||
if (!last)
|
if (!last || (child->num != -1 && last->num < child->num))
|
||||||
last = child;
|
last = child;
|
||||||
if (!first_opposite && child->num == -1)
|
if (!first_opposite && child->num == -1)
|
||||||
first_opposite = child;
|
first_opposite = child;
|
||||||
|
|
Loading…
Reference in New Issue