Begrudgingly format wl_list_* macros with a space before parameter list

I can't seem to configure clang-format to remove this space...
This commit is contained in:
Jente Hidskes 2020-02-17 21:11:27 +01:00
parent 6cbc202662
commit 6d0714bfa3
4 changed files with 22 additions and 22 deletions

View file

@ -142,7 +142,7 @@ output_drag_icons_for_each_surface(struct cg_output *output, struct wl_list *dra
cg_surface_iterator_func_t iterator, void *user_data)
{
struct cg_drag_icon *drag_icon;
wl_list_for_each(drag_icon, drag_icons, link) {
wl_list_for_each (drag_icon, drag_icons, link) {
if (drag_icon->wlr_drag_icon->mapped) {
double ox = drag_icon->lx;
double oy = drag_icon->ly;
@ -157,7 +157,7 @@ static void
output_for_each_surface(struct cg_output *output, cg_surface_iterator_func_t iterator, void *user_data)
{
struct cg_view *view;
wl_list_for_each_reverse(view, &output->server->views, link) {
wl_list_for_each_reverse (view, &output->server->views, link) {
output_view_for_each_surface(output, view, iterator, user_data);
}
@ -195,7 +195,7 @@ scan_out_primary_view(struct cg_output *output)
struct wlr_output *wlr_output = output->wlr_output;
struct cg_drag_icon *drag_icon;
wl_list_for_each(drag_icon, &server->seat->drag_icons, link) {
wl_list_for_each (drag_icon, &server->seat->drag_icons, link) {
if (drag_icon->wlr_drag_icon->mapped) {
return false;
}
@ -334,7 +334,7 @@ handle_output_transform(struct wl_listener *listener, void *data)
}
struct cg_view *view;
wl_list_for_each(view, &output->server->views, link) {
wl_list_for_each (view, &output->server->views, link) {
view_position(view);
}
}
@ -349,7 +349,7 @@ handle_output_mode(struct wl_listener *listener, void *data)
}
struct cg_view *view;
wl_list_for_each(view, &output->server->views, link) {
wl_list_for_each (view, &output->server->views, link) {
view_position(view);
}
}
@ -369,7 +369,7 @@ output_destroy(struct cg_output *output)
wlr_output_layout_remove(server->output_layout, output->wlr_output);
struct cg_view *view;
wl_list_for_each(view, &output->server->views, link) {
wl_list_for_each (view, &output->server->views, link) {
view_position(view);
}
@ -431,7 +431,7 @@ handle_new_output(struct wl_listener *listener, void *data)
wlr_output_layout_add_auto(server->output_layout, wlr_output);
struct cg_view *view;
wl_list_for_each(view, &output->server->views, link) {
wl_list_for_each (view, &output->server->views, link) {
view_position(view);
}

View file

@ -173,7 +173,7 @@ output_render(struct cg_output *output, pixman_region32_t *damage)
// TODO: render only top view, possibly use focused view for this, see #35.
struct cg_view *view;
wl_list_for_each_reverse(view, &server->views, link) {
wl_list_for_each_reverse (view, &server->views, link) {
render_view_toplevels(view, output, damage);
}

18
seat.c
View file

@ -67,7 +67,7 @@ desktop_view_at(struct cg_server *server, double lx, double ly, struct wlr_surfa
{
struct cg_view *view;
wl_list_for_each(view, &server->views, link) {
wl_list_for_each (view, &server->views, link) {
if (view_at(view, lx, ly, surface, sx, sy)) {
return view;
}
@ -156,7 +156,7 @@ handle_new_touch(struct cg_seat *seat, struct wlr_input_device *device)
if (device->output_name != NULL) {
struct cg_output *output;
wl_list_for_each(output, &seat->server->outputs, link) {
wl_list_for_each (output, &seat->server->outputs, link) {
if (strcmp(device->output_name, output->wlr_output->name) == 0) {
wlr_cursor_map_input_to_output(seat->cursor, device, output->wlr_output);
break;
@ -198,7 +198,7 @@ handle_new_pointer(struct cg_seat *seat, struct wlr_input_device *device)
if (device->output_name != NULL) {
struct cg_output *output;
wl_list_for_each(output, &seat->server->outputs, link) {
wl_list_for_each (output, &seat->server->outputs, link) {
if (strcmp(device->output_name, output->wlr_output->name) == 0) {
wlr_cursor_map_input_to_output(seat->cursor, device, output->wlr_output);
break;
@ -528,7 +528,7 @@ process_cursor_motion(struct cg_seat *seat, uint32_t time)
}
struct cg_drag_icon *drag_icon;
wl_list_for_each(drag_icon, &seat->drag_icons, link) {
wl_list_for_each (drag_icon, &seat->drag_icons, link) {
drag_icon_update_position(drag_icon);
}
@ -561,7 +561,7 @@ static void
drag_icon_damage(struct cg_drag_icon *drag_icon)
{
struct cg_output *output;
wl_list_for_each(output, &drag_icon->seat->server->outputs, link) {
wl_list_for_each (output, &drag_icon->seat->server->outputs, link) {
output_damage_surface(output, drag_icon->wlr_drag_icon->surface, drag_icon->lx, drag_icon->ly, true);
}
}
@ -660,15 +660,15 @@ handle_destroy(struct wl_listener *listener, void *data)
wl_list_remove(&seat->destroy.link);
struct cg_keyboard *keyboard, *keyboard_tmp;
wl_list_for_each_safe(keyboard, keyboard_tmp, &seat->keyboards, link) {
wl_list_for_each_safe (keyboard, keyboard_tmp, &seat->keyboards, link) {
handle_keyboard_destroy(&keyboard->destroy, NULL);
}
struct cg_pointer *pointer, *pointer_tmp;
wl_list_for_each_safe(pointer, pointer_tmp, &seat->pointers, link) {
wl_list_for_each_safe (pointer, pointer_tmp, &seat->pointers, link) {
handle_pointer_destroy(&pointer->destroy, NULL);
}
struct cg_touch *touch, *touch_tmp;
wl_list_for_each_safe(touch, touch_tmp, &seat->touch, link) {
wl_list_for_each_safe (touch, touch_tmp, &seat->touch, link) {
handle_touch_destroy(&touch->destroy, NULL);
}
wl_list_remove(&seat->new_input.link);
@ -827,7 +827,7 @@ seat_set_focus(struct cg_seat *seat, struct cg_view *view)
view_activate(view, true);
char *title = view_get_title(view);
struct cg_output *output;
wl_list_for_each(output, &server->outputs, link) {
wl_list_for_each (output, &server->outputs, link) {
output_set_window_title(output, title);
}
free(title);

10
view.c
View file

@ -140,7 +140,7 @@ void
view_damage_part(struct cg_view *view)
{
struct cg_output *output;
wl_list_for_each(output, &view->server->outputs, link) {
wl_list_for_each (output, &view->server->outputs, link) {
output_damage_surface(output, view->wlr_surface, view->lx, view->ly, false);
}
}
@ -149,7 +149,7 @@ void
view_damage_whole(struct cg_view *view)
{
struct cg_output *output;
wl_list_for_each(output, &view->server->outputs, link) {
wl_list_for_each (output, &view->server->outputs, link) {
output_damage_surface(output, view->wlr_surface, view->lx, view->ly, true);
}
}
@ -222,7 +222,7 @@ view_unmap(struct cg_view *view)
wl_list_remove(&view->new_subsurface.link);
struct cg_view_child *child, *tmp;
wl_list_for_each_safe(child, tmp, &view->children, link) {
wl_list_for_each_safe (child, tmp, &view->children, link) {
child->destroy(child);
}
@ -235,7 +235,7 @@ view_map(struct cg_view *view, struct wlr_surface *surface)
view->wlr_surface = surface;
struct wlr_subsurface *subsurface;
wl_list_for_each(subsurface, &view->wlr_surface->subsurfaces, parent_link) {
wl_list_for_each (subsurface, &view->wlr_surface->subsurfaces, parent_link) {
subsurface_create(view, subsurface);
}
@ -300,7 +300,7 @@ struct cg_view *
view_from_wlr_surface(struct cg_server *server, struct wlr_surface *surface)
{
struct cg_view *view;
wl_list_for_each(view, &server->views, link) {
wl_list_for_each (view, &server->views, link) {
if (view->wlr_surface == surface) {
return view;
}