From d9797488539dc82ffe88b641588379c82c3dd1c6 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Sat, 9 Jul 2016 12:56:06 +0200 Subject: [PATCH] traverse numbered workspaces in correct order --- src/workspace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5