diff --git a/events.c b/events.c index 42f9805..5ff1fb7 100644 --- a/events.c +++ b/events.c @@ -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); diff --git a/history.c b/history.c index 8195600..7da76f7 100644 --- a/history.c +++ b/history.c @@ -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))) || diff --git a/tree.c b/tree.c index 6b2c3b7..6807ab4 100644 --- a/tree.c +++ b/tree.c @@ -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};