rename wm_client_get_dir_rel_c to wm_find_client_direction
This commit is contained in:
parent
a1c5adece5
commit
8d32587144
16
src/client.c
16
src/client.c
@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <limits.h>
|
||||
|
||||
// TODO
|
||||
XWindowChanges wm_client_to_xwchanges(Client *c)
|
||||
XWindowChanges wm_client_to_xwchanges(Client *c)
|
||||
{
|
||||
|
||||
XWindowChanges ch;
|
||||
@ -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)
|
||||
|
||||
@ -394,7 +394,7 @@ Client* wm_client_get_dir_rel_c(Client *c, int dir)
|
||||
}
|
||||
}
|
||||
// TODO: bar
|
||||
} while((x > 0 && x < c->m->info.width) &&
|
||||
} while((x > 0 && x < c->m->info.width) &&
|
||||
(y > 0 && y < c->m->info.height));
|
||||
|
||||
ret:
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user