From 2a81a809a648046f8361056af06dadf3397fecaa Mon Sep 17 00:00:00 2001 From: Anant Murmu Date: Tue, 2 Dec 2025 08:02:16 +0530 Subject: [PATCH] fix: missing field in struct Rule isborderless --- config.def.h | 7 ++++--- dwl.c | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/config.def.h b/config.def.h index 95c2afa..9eee6ca 100644 --- a/config.def.h +++ b/config.def.h @@ -22,10 +22,11 @@ static int log_level = WLR_ERROR; /* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */ static const Rule rules[] = { - /* app_id title tags mask isfloating monitor */ + /* app_id title tags mask isfloating monitor isborderless */ /* examples: */ - { "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */ - { "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */ + { "Gimp_EXAMPLE", NULL, 0, 1, -1, 0 }, /* Start on currently visible tags floating, not tiled */ + { "firefox_EXAMPLE", NULL, 1 << 8, 0, -1, 0 }, /* Start on ONLY tag "9" */ + { "foo_EXAMPLE", NULL, 0, 0, -1, 1 }, /* Start on currently visible tags with no border around it */ }; /* layout(s) */ diff --git a/dwl.c b/dwl.c index 12f441e..572f754 100644 --- a/dwl.c +++ b/dwl.c @@ -137,7 +137,7 @@ typedef struct { #endif unsigned int bw; uint32_t tags; - int isfloating, isurgent, isfullscreen; + int isfloating, isurgent, isborderless, isfullscreen; uint32_t resize; /* configure serial of a pending resize */ } Client; @@ -228,6 +228,7 @@ typedef struct { uint32_t tags; int isfloating; int monitor; + int isborderless; } Rule; typedef struct { @@ -490,6 +491,7 @@ applyrules(Client *c) if ((!r->title || strstr(title, r->title)) && (!r->id || strstr(appid, r->id))) { c->isfloating = r->isfloating; + c->isborderless = r->isborderless; newtags |= r->tags; i = 0; wl_list_for_each(m, &mons, link) { @@ -2210,6 +2212,9 @@ resize(Client *c, struct wlr_box geo, int interact) if (!c->mon || !client_surface(c)->mapped) return; + if (c->isborderless) + c->bw = 0; + bbox = interact ? &sgeom : &c->mon->w; client_set_bounds(c, geo.width, geo.height); -- 2.52.0