mirror of
https://github.com/tiyn/dwl.git
synced 2025-11-13 05:49:45 +01:00
merged smartborders
This commit is contained in:
9
dwl.c
9
dwl.c
@@ -1271,7 +1271,7 @@ cursorwarptohint(void)
|
||||
void
|
||||
deck(Monitor *m)
|
||||
{
|
||||
unsigned int mw, my;
|
||||
unsigned int mw, my, draw_borders = 1;
|
||||
int i, n = 0;
|
||||
Client *c;
|
||||
|
||||
@@ -1281,6 +1281,9 @@ deck(Monitor *m)
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
if (n == smartborders)
|
||||
draw_borders = 0;
|
||||
|
||||
if (n > m->nmaster)
|
||||
mw = m->nmaster ? round(m->w.width * m->mfact) : 0;
|
||||
else
|
||||
@@ -1291,11 +1294,11 @@ deck(Monitor *m)
|
||||
continue;
|
||||
if (i < m->nmaster) {
|
||||
resize(c, (struct wlr_box){.x = m->w.x, .y = m->w.y + my, .width = mw,
|
||||
.height = (m->w.height - my) / (MIN(n, m->nmaster) - i)}, 0);
|
||||
.height = (m->w.height - my) / (MIN(n, m->nmaster) - i)}, 0, draw_borders);
|
||||
my += c->geom.height;
|
||||
} else {
|
||||
resize(c, (struct wlr_box){.x = m->w.x + mw, .y = m->w.y,
|
||||
.width = m->w.width - mw, .height = m->w.height}, 0);
|
||||
.width = m->w.width - mw, .height = m->w.height}, 0, draw_borders);
|
||||
snprintf(m->ltsymbol, LENGTH(m->ltsymbol), "%d", n-1);
|
||||
if (c == focustop(m))
|
||||
wlr_scene_node_raise_to_top(&c->scene->node);
|
||||
|
||||
Reference in New Issue
Block a user