Code style: fix misaligned and misindented comments
This commit is contained in:
parent
b6282b47bc
commit
27030c8566
|
@ -123,7 +123,7 @@ static bool binding_in_current_group(const Binding *bind) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void grab_keycode_for_binding(xcb_connection_t *conn, Binding *bind, uint32_t keycode) {
|
static void grab_keycode_for_binding(xcb_connection_t *conn, Binding *bind, uint32_t keycode) {
|
||||||
/* Grab the key in all combinations */
|
/* Grab the key in all combinations */
|
||||||
#define GRAB_KEY(modifier) \
|
#define GRAB_KEY(modifier) \
|
||||||
do { \
|
do { \
|
||||||
xcb_grab_key(conn, 0, root, modifier, keycode, XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC); \
|
xcb_grab_key(conn, 0, root, modifier, keycode, XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC); \
|
||||||
|
|
|
@ -353,7 +353,7 @@ CommandResult *parse_command(const char *input, yajl_gen gen) {
|
||||||
if (*walk == '\0' || *walk == ',' || *walk == ';') {
|
if (*walk == '\0' || *walk == ',' || *walk == ';') {
|
||||||
next_state(token);
|
next_state(token);
|
||||||
token_handled = true;
|
token_handled = true;
|
||||||
/* To make sure we start with an appropriate matching
|
/* To make sure we start with an appropriate matching
|
||||||
* datastructure for commands which do *not* specify any
|
* datastructure for commands which do *not* specify any
|
||||||
* criteria, we re-initialize the criteria system after
|
* criteria, we re-initialize the criteria system after
|
||||||
* every command. */
|
* every command. */
|
||||||
|
|
|
@ -202,7 +202,7 @@ void load_configuration(xcb_connection_t *conn, const char *override_configpath,
|
||||||
/* Clear the old config or initialize the data structure */
|
/* Clear the old config or initialize the data structure */
|
||||||
memset(&config, 0, sizeof(config));
|
memset(&config, 0, sizeof(config));
|
||||||
|
|
||||||
/* Initialize default colors */
|
/* Initialize default colors */
|
||||||
#define INIT_COLOR(x, cborder, cbackground, ctext, cindicator) \
|
#define INIT_COLOR(x, cborder, cbackground, ctext, cindicator) \
|
||||||
do { \
|
do { \
|
||||||
x.border = draw_util_hex_to_color(cborder); \
|
x.border = draw_util_hex_to_color(cborder); \
|
||||||
|
|
|
@ -409,7 +409,7 @@ struct ConfigResultIR *parse_config(const char *input, struct context *context)
|
||||||
if (*walk == '\0' || *walk == '\n' || *walk == '\r') {
|
if (*walk == '\0' || *walk == '\n' || *walk == '\r') {
|
||||||
next_state(token);
|
next_state(token);
|
||||||
token_handled = true;
|
token_handled = true;
|
||||||
/* To make sure we start with an appropriate matching
|
/* To make sure we start with an appropriate matching
|
||||||
* datastructure for commands which do *not* specify any
|
* datastructure for commands which do *not* specify any
|
||||||
* criteria, we re-initialize the criteria system after
|
* criteria, we re-initialize the criteria system after
|
||||||
* every command. */
|
* every command. */
|
||||||
|
|
|
@ -124,9 +124,9 @@ void init_logging(void) {
|
||||||
*/
|
*/
|
||||||
void open_logbuffer(void) {
|
void open_logbuffer(void) {
|
||||||
/* Reserve 1% of the RAM for the logfile, but at max 25 MiB.
|
/* Reserve 1% of the RAM for the logfile, but at max 25 MiB.
|
||||||
* For 512 MiB of RAM this will lead to a 5 MiB log buffer.
|
* For 512 MiB of RAM this will lead to a 5 MiB log buffer.
|
||||||
* At the moment (2011-12-10), no testcase leads to an i3 log
|
* At the moment (2011-12-10), no testcase leads to an i3 log
|
||||||
* of more than ~ 600 KiB. */
|
* of more than ~ 600 KiB. */
|
||||||
logbuffer_size = min(physical_mem_bytes * 0.01, shmlog_size);
|
logbuffer_size = min(physical_mem_bytes * 0.01, shmlog_size);
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
sasprintf(&shmlogname, "/tmp/i3-log-%d", getpid());
|
sasprintf(&shmlogname, "/tmp/i3-log-%d", getpid());
|
||||||
|
|
|
@ -529,7 +529,7 @@ int main(int argc, char *argv[]) {
|
||||||
root_screen = xcb_aux_get_screen(conn, conn_screen);
|
root_screen = xcb_aux_get_screen(conn, conn_screen);
|
||||||
root = root_screen->root;
|
root = root_screen->root;
|
||||||
|
|
||||||
/* Place requests for the atoms we need as soon as possible */
|
/* Place requests for the atoms we need as soon as possible */
|
||||||
#define xmacro(atom) \
|
#define xmacro(atom) \
|
||||||
xcb_intern_atom_cookie_t atom##_cookie = xcb_intern_atom(conn, 0, strlen(#atom), #atom);
|
xcb_intern_atom_cookie_t atom##_cookie = xcb_intern_atom(conn, 0, strlen(#atom), #atom);
|
||||||
#include "atoms.xmacro"
|
#include "atoms.xmacro"
|
||||||
|
@ -567,7 +567,7 @@ int main(int argc, char *argv[]) {
|
||||||
xcb_get_geometry_cookie_t gcookie = xcb_get_geometry(conn, root);
|
xcb_get_geometry_cookie_t gcookie = xcb_get_geometry(conn, root);
|
||||||
xcb_query_pointer_cookie_t pointercookie = xcb_query_pointer(conn, root);
|
xcb_query_pointer_cookie_t pointercookie = xcb_query_pointer(conn, root);
|
||||||
|
|
||||||
/* Setup NetWM atoms */
|
/* Setup NetWM atoms */
|
||||||
#define xmacro(name) \
|
#define xmacro(name) \
|
||||||
do { \
|
do { \
|
||||||
xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(conn, name##_cookie, NULL); \
|
xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(conn, name##_cookie, NULL); \
|
||||||
|
|
14
src/render.c
14
src/render.c
|
@ -134,17 +134,17 @@ void render_con(Con *con) {
|
||||||
x_raise_con(child);
|
x_raise_con(child);
|
||||||
if ((child = TAILQ_FIRST(&(con->focus_head)))) {
|
if ((child = TAILQ_FIRST(&(con->focus_head)))) {
|
||||||
/* By rendering the stacked container again, we handle the case
|
/* By rendering the stacked container again, we handle the case
|
||||||
* that we have a non-leaf-container inside the stack. In that
|
* that we have a non-leaf-container inside the stack. In that
|
||||||
* case, the children of the non-leaf-container need to be raised
|
* case, the children of the non-leaf-container need to be
|
||||||
* as well. */
|
* raised as well. */
|
||||||
render_con(child);
|
render_con(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.children != 1)
|
if (params.children != 1)
|
||||||
/* Raise the stack con itself. This will put the stack decoration on
|
/* Raise the stack con itself. This will put the stack
|
||||||
* top of every stack window. That way, when a new window is opened in
|
* decoration on top of every stack window. That way, when a
|
||||||
* the stack, the old window will not obscure part of the decoration
|
* new window is opened in the stack, the old window will not
|
||||||
* (it’s unmapped afterwards). */
|
* obscure part of the decoration (it’s unmapped afterwards). */
|
||||||
x_raise_con(con);
|
x_raise_con(con);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,8 +121,8 @@ bool scratchpad_show(Con *con) {
|
||||||
DLOG("Found an unfocused scratchpad window on this workspace\n");
|
DLOG("Found an unfocused scratchpad window on this workspace\n");
|
||||||
DLOG("Focusing it: %p\n", walk_con);
|
DLOG("Focusing it: %p\n", walk_con);
|
||||||
/* use con_descend_tiling_focused to get the last focused
|
/* use con_descend_tiling_focused to get the last focused
|
||||||
* window inside this scratch container in order to
|
* window inside this scratch container in order to
|
||||||
* keep the focus the same within this container */
|
* keep the focus the same within this container */
|
||||||
con_activate(con_descend_tiling_focused(walk_con));
|
con_activate(con_descend_tiling_focused(walk_con));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -413,8 +413,7 @@ int sd_booted(void) {
|
||||||
|
|
||||||
struct stat a, b;
|
struct stat a, b;
|
||||||
|
|
||||||
/* We simply test whether the systemd cgroup hierarchy is
|
/* We simply test whether the systemd cgroup hierarchy is mounted */
|
||||||
* mounted */
|
|
||||||
|
|
||||||
if (lstat("/sys/fs/cgroup", &a) < 0)
|
if (lstat("/sys/fs/cgroup", &a) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -439,7 +439,7 @@ void window_update_hints(i3Window *win, xcb_get_property_reply_t *prop, bool *ur
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void window_update_motif_hints(i3Window *win, xcb_get_property_reply_t *prop, border_style_t *motif_border_style) {
|
void window_update_motif_hints(i3Window *win, xcb_get_property_reply_t *prop, border_style_t *motif_border_style) {
|
||||||
/* This implementation simply mirrors Gnome's Metacity. Official
|
/* This implementation simply mirrors Gnome's Metacity. Official
|
||||||
* documentation of this hint is nowhere to be found.
|
* documentation of this hint is nowhere to be found.
|
||||||
* For more information see:
|
* For more information see:
|
||||||
* https://people.gnome.org/~tthurman/docs/metacity/xprops_8h-source.html
|
* https://people.gnome.org/~tthurman/docs/metacity/xprops_8h-source.html
|
||||||
|
|
Loading…
Reference in New Issue