aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2023-01-11 12:13:53 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2024-01-15 02:09:18 +0000
commit0151bd48ddef6c7679b1fd6fcce9db6340ab80d0 (patch)
treea9ce10a7994c3d7b06272966def6a8f539d9c07a /dwl.c
parent337d6ba3fbec3379162a1a287028fce363488197 (diff)
turn on -Wsign-compare
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/dwl.c b/dwl.c
index a20c607..77583ee 100644
--- a/dwl.c
+++ b/dwl.c
@@ -415,9 +415,9 @@ applybounds(Client *c, struct wlr_box *bbox)
c->geom.x = bbox->x + bbox->width - c->geom.width;
if (c->geom.y >= bbox->y + bbox->height)
c->geom.y = bbox->y + bbox->height - c->geom.height;
- if (c->geom.x + c->geom.width + 2 * c->bw <= bbox->x)
+ if (c->geom.x + c->geom.width + 2 * (int)c->bw <= bbox->x)
c->geom.x = bbox->x;
- if (c->geom.y + c->geom.height + 2 * c->bw <= bbox->y)
+ if (c->geom.y + c->geom.height + 2 * (int)c->bw <= bbox->y)
c->geom.y = bbox->y;
}
@@ -426,7 +426,8 @@ applyrules(Client *c)
{
/* rule matching */
const char *appid, *title;
- uint32_t i, newtags = 0;
+ uint32_t newtags = 0;
+ int i;
const Rule *r;
Monitor *mon = selmon, *m;
@@ -520,7 +521,7 @@ arrangelayers(Monitor *m)
arrangelayer(m, &m->layers[i], &usable_area, 0);
/* Find topmost keyboard interactive layer, if such a layer exists */
- for (i = 0; i < LENGTH(layers_above_shell); i++) {
+ for (i = 0; i < (int)LENGTH(layers_above_shell); i++) {
wl_list_for_each_reverse(l, &m->layers[layers_above_shell[i]], link) {
if (locked || !l->layer_surface->current.keyboard_interactive || !l->mapped)
continue;
@@ -657,7 +658,7 @@ cleanupmon(struct wl_listener *listener, void *data)
{
Monitor *m = wl_container_of(listener, m, destroy);
LayerSurface *l, *tmp;
- int i;
+ size_t i;
/* m->layers[i] are intentionally not unlinked */
for (i = 0; i < LENGTH(m->layers); i++) {
@@ -2166,7 +2167,7 @@ setup(void)
struct sigaction sa = {.sa_flags = SA_RESTART, .sa_handler = handlesig};
sigemptyset(&sa.sa_mask);
- for (i = 0; i < LENGTH(sig); i++)
+ for (i = 0; i < (int)LENGTH(sig); i++)
sigaction(sig[i], &sa, NULL);
wlr_log_init(log_level, NULL);
@@ -2454,7 +2455,8 @@ tagmon(const Arg *arg)
void
tile(Monitor *m)
{
- unsigned int i, n = 0, mw, my, ty;
+ unsigned int mw, my, ty;
+ int i, n = 0;
Client *c;
wl_list_for_each(c, &clients, link)