From: Benedikt Heine Date: Sat, 9 Jul 2016 10:56:06 +0000 (+0200) Subject: traverse numbered workspaces in correct order X-Git-Tag: 4.13~52^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d9797488539dc82ffe88b641588379c82c3dd1c6;p=i3%2Fi3 traverse numbered workspaces in correct order --- diff --git a/src/workspace.c b/src/workspace.c index f8d15ba1..b0d59773 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -544,7 +544,7 @@ Con *workspace_next(void) { NODES_FOREACH(output_get_content(output)) { if (child->type != CT_WORKSPACE) continue; - if (!first) + if (!first || (child->num != -1 && child->num < first->num)) first = child; if (!first_opposite && child->num == -1) first_opposite = child; @@ -610,7 +610,7 @@ Con *workspace_prev(void) { NODES_FOREACH_REVERSE(output_get_content(output)) { if (child->type != CT_WORKSPACE) continue; - if (!last) + if (!last || (child->num != -1 && last->num < child->num)) last = child; if (!first_opposite && child->num == -1) first_opposite = child;