mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-31 22:25:29 -04:00
opt: set bound for floating window
This commit is contained in:
parent
150d9cc332
commit
879b33f65d
1 changed files with 4 additions and 1 deletions
|
|
@ -4840,7 +4840,7 @@ void resize(Client *c, struct wlr_box geo, int interact) {
|
|||
bbox = interact ? &sgeom : &c->mon->w;
|
||||
|
||||
if (strcmp(c->mon->pertag->ltidxs[c->mon->pertag->curtag]->name,
|
||||
"scroller") == 0) {
|
||||
"scroller") == 0 && !c->isfloating) {
|
||||
c->geom = geo;
|
||||
c->geom.width = MAX(1 + 2 * (int)c->bw, c->geom.width);
|
||||
c->geom.height = MAX(1 + 2 * (int)c->bw, c->geom.height);
|
||||
|
|
@ -5036,11 +5036,14 @@ setfloating(Client *c, int floating) {
|
|||
hit = applyrulesgeom(c);
|
||||
target_box = hit == 1 ? c->geom : target_box;
|
||||
c->geom = backup_box;
|
||||
|
||||
// restore to the memeroy geom
|
||||
if (c->oldgeom.width > 0 && c->oldgeom.height > 0) {
|
||||
resize(c, c->oldgeom, 0);
|
||||
} else {
|
||||
resize(c, target_box, 0);
|
||||
}
|
||||
|
||||
c->need_float_size_reduce = 0;
|
||||
} else if (c->isfloating && c == grabc) {
|
||||
c->need_float_size_reduce = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue