mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-04 07:15:55 -04:00
break change: new monitorrule format
This commit is contained in:
parent
05010a1114
commit
6624d80522
4 changed files with 149 additions and 148 deletions
|
|
@ -110,6 +110,7 @@ void vertical_deck(Monitor *m) {
|
|||
Client *c = NULL;
|
||||
Client *fc = NULL;
|
||||
float mfact;
|
||||
uint32_t nmasters = m->pertag->nmasters[m->pertag->curtag];
|
||||
|
||||
int32_t cur_gappiv = enablegaps ? m->gappiv : 0;
|
||||
int32_t cur_gappoh = enablegaps ? m->gappoh : 0;
|
||||
|
|
@ -134,8 +135,8 @@ void vertical_deck(Monitor *m) {
|
|||
mfact = fc->master_mfact_per > 0.0f ? fc->master_mfact_per
|
||||
: m->pertag->mfacts[m->pertag->curtag];
|
||||
|
||||
if (n > m->nmaster)
|
||||
mh = m->nmaster ? round((m->w.height - 2 * cur_gappov) * mfact) : 0;
|
||||
if (n > nmasters)
|
||||
mh = nmasters ? round((m->w.height - 2 * cur_gappov) * mfact) : 0;
|
||||
else
|
||||
mh = m->w.height - 2 * cur_gappov;
|
||||
|
||||
|
|
@ -143,13 +144,13 @@ void vertical_deck(Monitor *m) {
|
|||
wl_list_for_each(c, &clients, link) {
|
||||
if (!VISIBLEON(c, m) || !ISTILED(c))
|
||||
continue;
|
||||
if (i < m->nmaster) {
|
||||
if (i < nmasters) {
|
||||
resize(
|
||||
c,
|
||||
(struct wlr_box){.x = m->w.x + cur_gappoh + mx,
|
||||
.y = m->w.y + cur_gappov,
|
||||
.width = (m->w.width - 2 * cur_gappoh - mx) /
|
||||
(MIN(n, m->nmaster) - i),
|
||||
(MIN(n, nmasters) - i),
|
||||
.height = mh},
|
||||
0);
|
||||
mx += c->geom.width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue