Cleanup: indentation

Mixing tabs/spaces
This commit is contained in:
Campbell Barton 2016-04-11 06:07:48 +10:00
parent 56b543ef2d
commit 3eca593ef9
3 changed files with 25 additions and 25 deletions

View file

@ -309,8 +309,8 @@ void focus_in(xcb_generic_event_t *evt)
void button_press(xcb_generic_event_t *evt)
{
xcb_button_press_event_t *e = (xcb_button_press_event_t *) evt;
switch (e->detail) {
xcb_button_press_event_t *e = (xcb_button_press_event_t *) evt;
switch (e->detail) {
case XCB_BUTTON_INDEX_1:
if (click_to_focus && cleaned_mask(e->state) == XCB_NONE) {
xcb_allow_events(dpy, XCB_ALLOW_REPLAY_POINTER, e->time);

View file

@ -105,8 +105,8 @@ void history_swap_desktops(monitor_t *m1, desktop_t *d1, monitor_t *m2, desktop_
void history_remove(desktop_t *d, node_t *n, bool deep)
{
/* removing from the newest to the oldest is required */
/* for maintaining the *latest* attribute */
/* removing from the newest to the oldest is required */
/* for maintaining the *latest* attribute */
history_t *b = history_tail;
while (b != NULL) {
if ((n != NULL && ((deep && is_descendant(b->loc.node, n)) || (!deep && b->loc.node == n))) ||

42
tree.c
View file

@ -842,14 +842,14 @@ node_t *nearest_neighbor(monitor_t *m, desktop_t *d, node_t *n, direction_t dir,
if (history_aware_focus) {
nearest = nearest_from_history(m, d, n, dir, sel);
}
if (nearest == NULL) {
if (focus_by_distance) {
nearest = nearest_from_distance(m, d, n, dir, sel);
} else {
nearest = nearest_from_tree(m, d, n, dir, sel);
}
}
return nearest;
if (nearest == NULL) {
if (focus_by_distance) {
nearest = nearest_from_distance(m, d, n, dir, sel);
} else {
nearest = nearest_from_tree(m, d, n, dir, sel);
}
}
return nearest;
}
/* returns *true* if *a* is a child of *b* */
@ -907,23 +907,23 @@ node_t *find_by_id_in(node_t *r, uint32_t id)
node_t *nearest_from_tree(monitor_t *m, desktop_t *d, node_t *n, direction_t dir, node_select_t sel)
{
if (n == NULL) {
return NULL;
}
if (n == NULL) {
return NULL;
}
node_t *fence = find_fence(n, dir);
node_t *fence = find_fence(n, dir);
if (fence == NULL) {
return NULL;
}
if (fence == NULL) {
return NULL;
}
node_t *nearest = NULL;
node_t *nearest = NULL;
if (dir == DIR_NORTH || dir == DIR_WEST) {
nearest = second_extrema(fence->first_child);
} else if (dir == DIR_SOUTH || dir == DIR_EAST) {
nearest = first_extrema(fence->second_child);
}
if (dir == DIR_NORTH || dir == DIR_WEST) {
nearest = second_extrema(fence->first_child);
} else if (dir == DIR_SOUTH || dir == DIR_EAST) {
nearest = first_extrema(fence->second_child);
}
coordinates_t ref = {m, d, n};
coordinates_t loc = {m, d, nearest};