rename wm_client_get_dir_rel_c to wm_find_client_direction

This commit is contained in:
Akos Horvath 2024-04-06 17:58:40 +02:00
parent a1c5adece5
commit 8d32587144
2 changed files with 9 additions and 9 deletions

View File

@ -207,16 +207,16 @@ void wm_client_focus_dir(Wm *wm, Client *c, int dir)
switch (dir) {
case UP:
wm_client_focus(wm, wm_client_get_dir_rel_c(c, dir));
wm_client_focus(wm, wm_find_client_direction(c, dir));
break;
case DOWN:
wm_client_focus(wm, wm_client_get_dir_rel_c(c, dir));
wm_client_focus(wm, wm_find_client_direction(c, dir));
break;
case LEFT:
wm_client_focus(wm, wm_client_get_dir_rel_c(c, dir));
wm_client_focus(wm, wm_find_client_direction(c, dir));
break;
case RIGHT:
wm_client_focus(wm, wm_client_get_dir_rel_c(c, dir));
wm_client_focus(wm, wm_find_client_direction(c, dir));
break;
default:
fprintf(stderr, "wm: %s invalid direction: %d\n", __func__, dir);
@ -231,7 +231,7 @@ void wm_client_swap_dir(Wm* wm, Client *c, int dir)
TreeNode *client_node = wm_treenode_ptr_find_client_node(c->ws->tree, c);
assert(client_node);
Client *client = wm_client_get_dir_rel_c(c, dir);
Client *client = wm_find_client_direction(c, dir);
if (!client)
return;
@ -335,7 +335,7 @@ Atom wm_client_get_atom(Wm *wm, Client *c, const char *name, unsigned char **ato
return type_ret;
}
Client* wm_client_get_dir_rel_c(Client *c, int dir)
Client* wm_find_client_direction(Client *c, int dir)
{
DEBUG_PRINT("%s c: %p\n", __func__, (void*)c)

View File

@ -126,7 +126,7 @@ Atom wm_client_get_atom(Wm *wm, Client *c, const char *name, unsigned char **ato
/**
* Finds the client in the direction `dir` relative to `c`.
*/
Client* wm_client_get_dir_rel_c(Client *c, int dir);
Client* wm_find_client_direction(Client *c, int dir);
/**
* Returns the currently focused client.