diff --git a/src/config/parse_config.h b/src/config/parse_config.h index b13e7d9..f066958 100644 --- a/src/config/parse_config.h +++ b/src/config/parse_config.h @@ -1085,6 +1085,7 @@ FuncType parse_func_name(char *func_name, Arg *arg, char *arg_value, (*arg).i = parse_direction(arg_value); } else if (strcmp(func_name, "scroller_unstack") == 0) { func = scroller_unstack; + (*arg).i = parse_direction(arg_value); } else { return NULL; } diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 202afd5..5718062 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -1652,7 +1652,10 @@ int32_t scroller_unstack(const Arg *arg) { // Insert c after the stack it was in wl_list_remove(&c->link); - wl_list_insert(&scroller_stack_head->link, &c->link); + if (arg->i == RIGHT) + wl_list_insert(&scroller_stack_head->link, &c->link); + else + wl_list_insert(scroller_stack_head->link.prev, &c->link); focusclient(c, 1); arrange(selmon, false, false);