diff --git a/.clang-format b/.clang-format index a0516fe..b004eff 100644 --- a/.clang-format +++ b/.clang-format @@ -40,4 +40,10 @@ SpacesInContainerLiterals: false SpacesInParentheses: false SpacesInSquareBrackets: false UseTab: Never +ForEachMacros: + - wl_list_for_each + - wl_list_for_each_safe + - wl_list_for_each_reverse + - wl_list_for_each_reverse_safe + - wl_array_for_each ... diff --git a/kiwmi/desktop/output.c b/kiwmi/desktop/output.c index 178d078..3b535ba 100644 --- a/kiwmi/desktop/output.c +++ b/kiwmi/desktop/output.c @@ -96,8 +96,7 @@ output_frame_notify(struct wl_listener *listener, void *data) wlr_renderer_clear(renderer, (float[]){0.0f, 1.0f, 0.0f, 1.0f}); struct kiwmi_view *view; - wl_list_for_each_reverse(view, &desktop->views, link) - { + wl_list_for_each_reverse (view, &desktop->views, link) { if (!view->mapped) { continue; } diff --git a/kiwmi/desktop/view.c b/kiwmi/desktop/view.c index 65d9633..b2d8814 100644 --- a/kiwmi/desktop/view.c +++ b/kiwmi/desktop/view.c @@ -123,8 +123,7 @@ view_at( double *sy) { struct kiwmi_view *view; - wl_list_for_each(view, &desktop->views, link) - { + wl_list_for_each (view, &desktop->views, link) { if (surface_at(view, surface, lx, ly, sx, sy)) { return view; } diff --git a/kiwmi/luak.c b/kiwmi/luak.c index 6a84e61..d96b0a2 100644 --- a/kiwmi/luak.c +++ b/kiwmi/luak.c @@ -298,7 +298,7 @@ luaK_fini(struct kiwmi_lua *lua) { struct lua_callback *lc; struct lua_callback *tmp; - wl_list_for_each_safe(lc, tmp, &lua->callbacks, link) { + wl_list_for_each_safe (lc, tmp, &lua->callbacks, link) { wl_list_remove(&lc->listener.link); wl_list_remove(&lc->link);