opt: better direction algorithm for client find

This commit is contained in:
DreamMaoMao 2026-06-16 08:08:30 +08:00
parent 17fd82a08b
commit 4e25a6c64b
2 changed files with 104 additions and 125 deletions

View file

@ -131,9 +131,14 @@ int32_t exchange_stack_client(const Arg *arg) {
}
int32_t focusdir(const Arg *arg) {
if(!selmon)
return 0;
Client *c = NULL;
c = direction_select(arg);
c = get_focused_stack_client(c, arg->tc);
if(!selmon->isoverview)
c = get_focused_stack_client(c, arg->tc);
if (c) {
focusclient(c, 1);
if (config.warpcursor)