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