mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-09 10:07:13 -05:00
fix: fix layout switch before resize
This commit is contained in:
parent
43881077bf
commit
cf3cd6fe3f
1 changed files with 11 additions and 2 deletions
13
src/mango.c
13
src/mango.c
|
|
@ -3617,13 +3617,22 @@ void init_client_properties(Client *c) {
|
|||
|
||||
void set_size_per(Monitor *m, Client *c) {
|
||||
Client *fc = NULL;
|
||||
bool found = false;
|
||||
wl_list_for_each(fc, &clients, link) {
|
||||
if (VISIBLEON(fc, m) && ISTILED(fc) && fc != c) {
|
||||
c->master_width_per = fc->master_width_per;
|
||||
c->master_height_per = fc->master_height_per;
|
||||
c->slave_height_per = fc->slave_height_per;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!found) {
|
||||
c->master_width_per = 0.5f;
|
||||
c->master_height_per = 1.0f;
|
||||
c->slave_height_per = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void // old fix to 0.5
|
||||
|
|
@ -3935,13 +3944,13 @@ void resize_tile_client(Client *grabc) {
|
|||
} else {
|
||||
delta_y = fabsf(delta_y);
|
||||
}
|
||||
} else if(grabc->ismaster && !next->ismaster) {
|
||||
} else if(grabc->ismaster && next && !next->ismaster) {
|
||||
if(moving_up) {
|
||||
delta_y = fabsf(delta_y);
|
||||
} else {
|
||||
delta_y = -fabsf(delta_y);
|
||||
}
|
||||
} else if(!grabc->ismaster && prev->ismaster) {
|
||||
} else if(!grabc->ismaster && prev && prev->ismaster) {
|
||||
if(moving_up) {
|
||||
delta_y = -fabsf(delta_y);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue