mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-20 01:40:18 -05:00
fix: fix center tile size per reset
This commit is contained in:
parent
ef92029ae0
commit
d8b8d71fed
1 changed files with 11 additions and 3 deletions
|
|
@ -11,13 +11,16 @@ void restore_size_per(Monitor *m, Client *c) {
|
|||
if (current_layout->id == SCROLLER ||
|
||||
current_layout->id == VERTICAL_SCROLLER || current_layout->id == GRID ||
|
||||
current_layout->id == VERTICAL_GRID || current_layout->id == DECK ||
|
||||
current_layout->id == VERTICAL_DECK ||
|
||||
current_layout->id == CENTER_TILE || current_layout->id == MONOCLE) {
|
||||
current_layout->id == VERTICAL_DECK || current_layout->id == MONOCLE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (current_layout->id == CENTER_TILE || c->ismaster) {
|
||||
set_size_per(m, c);
|
||||
wl_list_for_each(fc, &clients, link) {
|
||||
if (VISIBLEON(fc, m) && ISTILED(fc) && !c->ismaster) {
|
||||
set_size_per(m, fc);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -44,8 +47,13 @@ void set_size_per(Monitor *m, Client *c) {
|
|||
if (!m || !c)
|
||||
return;
|
||||
|
||||
const Layout *current_layout = m->pertag->ltidxs[m->pertag->curtag];
|
||||
|
||||
wl_list_for_each(fc, &clients, link) {
|
||||
if (VISIBLEON(fc, m) && ISTILED(fc) && fc != c) {
|
||||
if (current_layout->id == CENTER_TILE &&
|
||||
!(fc->isleftstack ^ c->isleftstack))
|
||||
continue;
|
||||
c->master_mfact_per = fc->master_mfact_per;
|
||||
c->master_inner_per = fc->master_inner_per;
|
||||
c->stack_inner_per = fc->stack_inner_per;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue