mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
opt: tile layout use arg mon not selmon
This commit is contained in:
parent
47d24d6e8a
commit
99cf09cb08
2 changed files with 10 additions and 10 deletions
|
|
@ -451,10 +451,10 @@ void tile(Monitor *m) {
|
||||||
cur_gappov = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappov;
|
cur_gappov = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappov;
|
||||||
cur_gappoh = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappoh;
|
cur_gappoh = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappoh;
|
||||||
|
|
||||||
if (n > selmon->pertag->nmasters[selmon->pertag->curtag])
|
if (n > m->pertag->nmasters[m->pertag->curtag])
|
||||||
mw = selmon->pertag->nmasters[selmon->pertag->curtag]
|
mw = m->pertag->nmasters[m->pertag->curtag]
|
||||||
? (m->w.width + cur_gappih * ie) *
|
? (m->w.width + cur_gappih * ie) *
|
||||||
selmon->pertag->mfacts[selmon->pertag->curtag]
|
m->pertag->mfacts[m->pertag->curtag]
|
||||||
: 0;
|
: 0;
|
||||||
else
|
else
|
||||||
mw = m->w.width - 2 * cur_gappoh + cur_gappih * ie;
|
mw = m->w.width - 2 * cur_gappoh + cur_gappih * ie;
|
||||||
|
|
@ -463,8 +463,8 @@ void tile(Monitor *m) {
|
||||||
wl_list_for_each(c, &clients, link) {
|
wl_list_for_each(c, &clients, link) {
|
||||||
if (!VISIBLEON(c, m) || !ISTILED(c))
|
if (!VISIBLEON(c, m) || !ISTILED(c))
|
||||||
continue;
|
continue;
|
||||||
if (i < selmon->pertag->nmasters[selmon->pertag->curtag]) {
|
if (i < m->pertag->nmasters[m->pertag->curtag]) {
|
||||||
r = MIN(n, selmon->pertag->nmasters[selmon->pertag->curtag]) - i;
|
r = MIN(n, m->pertag->nmasters[m->pertag->curtag]) - i;
|
||||||
h = (m->w.height - my - cur_gappov - cur_gappiv * ie * (r - 1)) / r;
|
h = (m->w.height - my - cur_gappov - cur_gappiv * ie * (r - 1)) / r;
|
||||||
resize(c,
|
resize(c,
|
||||||
(struct wlr_box){.x = m->w.x + cur_gappoh,
|
(struct wlr_box){.x = m->w.x + cur_gappoh,
|
||||||
|
|
|
||||||
|
|
@ -438,10 +438,10 @@ void vertical_tile(Monitor *m) {
|
||||||
cur_gappov = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappov;
|
cur_gappov = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappov;
|
||||||
cur_gappoh = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappoh;
|
cur_gappoh = smartgaps && m->visible_tiling_clients == 1 ? 0 : cur_gappoh;
|
||||||
|
|
||||||
if (n > selmon->pertag->nmasters[selmon->pertag->curtag])
|
if (n > m->pertag->nmasters[m->pertag->curtag])
|
||||||
mh = selmon->pertag->nmasters[selmon->pertag->curtag]
|
mh = m->pertag->nmasters[m->pertag->curtag]
|
||||||
? (m->w.height + cur_gappiv * ie) *
|
? (m->w.height + cur_gappiv * ie) *
|
||||||
selmon->pertag->mfacts[selmon->pertag->curtag]
|
m->pertag->mfacts[m->pertag->curtag]
|
||||||
: 0;
|
: 0;
|
||||||
else
|
else
|
||||||
mh = m->w.height - 2 * cur_gappoh + cur_gappiv * ie;
|
mh = m->w.height - 2 * cur_gappoh + cur_gappiv * ie;
|
||||||
|
|
@ -450,8 +450,8 @@ void vertical_tile(Monitor *m) {
|
||||||
wl_list_for_each(c, &clients, link) {
|
wl_list_for_each(c, &clients, link) {
|
||||||
if (!VISIBLEON(c, m) || !ISTILED(c))
|
if (!VISIBLEON(c, m) || !ISTILED(c))
|
||||||
continue;
|
continue;
|
||||||
if (i < selmon->pertag->nmasters[selmon->pertag->curtag]) {
|
if (i < m->pertag->nmasters[m->pertag->curtag]) {
|
||||||
r = MIN(n, selmon->pertag->nmasters[selmon->pertag->curtag]) - i;
|
r = MIN(n, m->pertag->nmasters[m->pertag->curtag]) - i;
|
||||||
w = (m->w.width - mx - cur_gappov - cur_gappiv * ie * (r - 1)) / r;
|
w = (m->w.width - mx - cur_gappov - cur_gappiv * ie * (r - 1)) / r;
|
||||||
resize(c,
|
resize(c,
|
||||||
(struct wlr_box){.x = m->w.x + mx,
|
(struct wlr_box){.x = m->w.x + mx,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue