Fix coding style

This commit is contained in:
Johan Malm 2022-11-03 19:58:21 +00:00 committed by Consolatis
parent 6a242d5739
commit e45e2c7e60
16 changed files with 28 additions and 22 deletions

View file

@ -7,9 +7,11 @@ struct server;
struct wl_list; struct wl_list;
struct action { struct action {
struct wl_list link; /* struct keybinding.actions, struct wl_list link; /*
* struct mousebinding.actions, * struct keybinding.actions
* struct menuitem.actions */ * struct mousebinding.actions
* struct menuitem.actions
*/
uint32_t type; /* enum action_type */ uint32_t type; /* enum action_type */
struct wl_list args; /* struct action_arg.link */ struct wl_list args; /* struct action_arg.link */

View file

@ -9,8 +9,10 @@ struct wl_list;
/* Double use: as config in config/rcxml.c and as instance in workspaces.c */ /* Double use: as config in config/rcxml.c and as instance in workspaces.c */
struct workspace { struct workspace {
struct wl_list link; /* struct server.workspaces struct wl_list link; /*
struct rcxml.workspace_config.workspaces */ * struct server.workspaces
* struct rcxml.workspace_config.workspaces
*/
struct server *server; struct server *server;
char *name; char *name;

View file

@ -36,6 +36,7 @@ restore_nofile_limit(void)
} }
if (setrlimit(RLIMIT_NOFILE, &original_nofile_rlimit) != 0) { if (setrlimit(RLIMIT_NOFILE, &original_nofile_rlimit) != 0) {
wlr_log_errno(WLR_ERROR, "Failed to restore max open files limit: setrlimit(NOFILE) failed"); wlr_log_errno(WLR_ERROR,
"Failed to restore max open files limit: setrlimit(NOFILE) failed");
} }
} }

View file

@ -68,7 +68,8 @@ draw_cairo_border(cairo_t *cairo, double width, double height, double line_width
double x, y, w, h; double x, y, w, h;
/* The anchor point of a line is in the center */ /* The anchor point of a line is in the center */
x = y = line_width / 2; x = line_width / 2;
y = x;
w = width - line_width; w = width - line_width;
h = height - line_width; h = height - line_width;
cairo_set_line_width(cairo, line_width); cairo_set_line_width(cairo, line_width);

View file

@ -47,8 +47,8 @@ scaled_font_buffer_create(struct wlr_scene_tree *parent)
{ {
assert(parent); assert(parent);
struct scaled_font_buffer *self = znew(*self); struct scaled_font_buffer *self = znew(*self);
struct scaled_scene_buffer *scaled_buffer struct scaled_scene_buffer *scaled_buffer =
= scaled_scene_buffer_create(parent, &impl); scaled_scene_buffer_create(parent, &impl);
if (!scaled_buffer) { if (!scaled_buffer) {
free(self); free(self);
return NULL; return NULL;

View file

@ -15,10 +15,10 @@
#include "resistance.h" #include "resistance.h"
#include "ssd.h" #include "ssd.h"
static const char **cursor_names = NULL; static const char * const *cursor_names = NULL;
/* Usual cursor names */ /* Usual cursor names */
static const char *cursors_xdg[] = { static const char * const cursors_xdg[] = {
NULL, NULL,
"default", "default",
"grab", "grab",
@ -33,7 +33,7 @@ static const char *cursors_xdg[] = {
}; };
/* XCursor fallbacks */ /* XCursor fallbacks */
static const char *cursors_x11[] = { static const char * const cursors_x11[] = {
NULL, NULL,
"left_ptr", "left_ptr",
"grabbing", "grabbing",