clang-format: bring back ForeachMacros (#3948)
* clang-format: bring back ForeachMacros
ForeachMacros was disabled in 4211274fcd
due to the breakage of include/queue.h. The currently used version,
clang-format-6.0 doesn't break it.
* Add curly braces
Co-authored-by: Orestis Floros <orestisflo@gmail.com>
This commit is contained in:
@ -62,7 +62,7 @@ bool event_is_ignored(const int sequence, const int response_type) {
|
||||
event = SLIST_NEXT(event, ignore_events);
|
||||
}
|
||||
|
||||
SLIST_FOREACH(event, &ignore_events, ignore_events) {
|
||||
SLIST_FOREACH (event, &ignore_events, ignore_events) {
|
||||
if (event->sequence != sequence)
|
||||
continue;
|
||||
|
||||
@ -160,11 +160,12 @@ static void handle_enter_notify(xcb_enter_notify_event_t *event) {
|
||||
layout_t layout = (enter_child ? con->parent->layout : con->layout);
|
||||
if (layout == L_DEFAULT) {
|
||||
Con *child;
|
||||
TAILQ_FOREACH(child, &(con->nodes_head), nodes)
|
||||
if (rect_contains(child->deco_rect, event->event_x, event->event_y)) {
|
||||
LOG("using child %p / %s instead!\n", child, child->name);
|
||||
con = child;
|
||||
break;
|
||||
TAILQ_FOREACH (child, &(con->nodes_head), nodes) {
|
||||
if (rect_contains(child->deco_rect, event->event_x, event->event_y)) {
|
||||
LOG("using child %p / %s instead!\n", child, child->name);
|
||||
con = child;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -216,7 +217,7 @@ static void handle_motion_notify(xcb_motion_notify_event_t *event) {
|
||||
|
||||
/* see over which rect the user is */
|
||||
Con *current;
|
||||
TAILQ_FOREACH(current, &(con->nodes_head), nodes) {
|
||||
TAILQ_FOREACH (current, &(con->nodes_head), nodes) {
|
||||
if (!rect_contains(current->deco_rect, event->event_x, event->event_y))
|
||||
continue;
|
||||
|
||||
|
Reference in New Issue
Block a user