fix use of loop initial declaration
forbidden by the suckless style
This commit is contained in:
parent
bc72af6e24
commit
cd96f889b8
1 changed files with 5 additions and 3 deletions
8
dwl.c
8
dwl.c
|
@ -412,6 +412,7 @@ applyexclusive(struct wlr_box *usable_area,
|
||||||
uint32_t anchor, int32_t exclusive,
|
uint32_t anchor, int32_t exclusive,
|
||||||
int32_t margin_top, int32_t margin_right,
|
int32_t margin_top, int32_t margin_right,
|
||||||
int32_t margin_bottom, int32_t margin_left) {
|
int32_t margin_bottom, int32_t margin_left) {
|
||||||
|
size_t i;
|
||||||
Edge edges[] = {
|
Edge edges[] = {
|
||||||
{ /* Top */
|
{ /* Top */
|
||||||
.singular_anchor = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP,
|
.singular_anchor = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP,
|
||||||
|
@ -450,7 +451,7 @@ applyexclusive(struct wlr_box *usable_area,
|
||||||
.margin = margin_right,
|
.margin = margin_right,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
for (size_t i = 0; i < LENGTH(edges); i++) {
|
for (i = 0; i < LENGTH(edges); i++) {
|
||||||
if ((anchor == edges[i].singular_anchor || anchor == edges[i].anchor_triplet)
|
if ((anchor == edges[i].singular_anchor || anchor == edges[i].anchor_triplet)
|
||||||
&& exclusive + edges[i].margin > 0) {
|
&& exclusive + edges[i].margin > 0) {
|
||||||
if (edges[i].positive_axis)
|
if (edges[i].positive_axis)
|
||||||
|
@ -612,7 +613,7 @@ arrangelayers(Monitor *m)
|
||||||
arrangelayer(m, &m->layers[i], &usable_area, 0);
|
arrangelayer(m, &m->layers[i], &usable_area, 0);
|
||||||
|
|
||||||
/* Find topmost keyboard interactive layer, if such a layer exists */
|
/* Find topmost keyboard interactive layer, if such a layer exists */
|
||||||
for (size_t i = 0; i < LENGTH(layers_above_shell); i++) {
|
for (i = 0; i < LENGTH(layers_above_shell); i++) {
|
||||||
wl_list_for_each_reverse(layersurface,
|
wl_list_for_each_reverse(layersurface,
|
||||||
&m->layers[layers_above_shell[i]], link) {
|
&m->layers[layers_above_shell[i]], link) {
|
||||||
if (layersurface->layer_surface->current.keyboard_interactive &&
|
if (layersurface->layer_surface->current.keyboard_interactive &&
|
||||||
|
@ -922,13 +923,14 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
struct wlr_output *wlr_output = data;
|
struct wlr_output *wlr_output = data;
|
||||||
const MonitorRule *r;
|
const MonitorRule *r;
|
||||||
Client *c;
|
Client *c;
|
||||||
|
size_t i;
|
||||||
Monitor *m = wlr_output->data = ecalloc(1, sizeof(*m));
|
Monitor *m = wlr_output->data = ecalloc(1, sizeof(*m));
|
||||||
m->wlr_output = wlr_output;
|
m->wlr_output = wlr_output;
|
||||||
|
|
||||||
wlr_output_init_render(wlr_output, alloc, drw);
|
wlr_output_init_render(wlr_output, alloc, drw);
|
||||||
|
|
||||||
/* Initialize monitor state using configured rules */
|
/* Initialize monitor state using configured rules */
|
||||||
for (size_t i = 0; i < LENGTH(m->layers); i++)
|
for (i = 0; i < LENGTH(m->layers); i++)
|
||||||
wl_list_init(&m->layers[i]);
|
wl_list_init(&m->layers[i]);
|
||||||
m->tagset[0] = m->tagset[1] = 1;
|
m->tagset[0] = m->tagset[1] = 1;
|
||||||
for (r = monrules; r < END(monrules); r++) {
|
for (r = monrules; r < END(monrules); r++) {
|
||||||
|
|
Loading…
Reference in a new issue