opt: better direction algorithm for client find

This commit is contained in:
DreamMaoMao 2026-06-16 08:08:30 +08:00
parent ce1879d417
commit 84a7d3d1e9
2 changed files with 104 additions and 125 deletions

View file

@ -130,9 +130,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)