mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-02 06:46:29 -04:00
fix: tagmon miss arrange
This commit is contained in:
parent
54109d3bf6
commit
beeee7ec7d
1 changed files with 7 additions and 4 deletions
11
maomao.c
11
maomao.c
|
|
@ -5443,14 +5443,17 @@ void tagmon(const Arg *arg) {
|
||||||
if (c) {
|
if (c) {
|
||||||
setmon(c, dirtomon(arg->i), 0);
|
setmon(c, dirtomon(arg->i), 0);
|
||||||
reset_foreign_tolevel(c);
|
reset_foreign_tolevel(c);
|
||||||
c->geom.width = (int)(c->geom.width * c->mon->w.width / selmon->w.width);
|
|
||||||
c->geom.height =
|
|
||||||
(int)(c->geom.height * c->mon->w.height / selmon->w.height);
|
|
||||||
selmon = c->mon;
|
|
||||||
// 重新计算居中的坐标
|
// 重新计算居中的坐标
|
||||||
if (c->isfloating) {
|
if (c->isfloating) {
|
||||||
|
c->geom.width = (int)(c->geom.width * c->mon->w.width / selmon->w.width);
|
||||||
|
c->geom.height =
|
||||||
|
(int)(c->geom.height * c->mon->w.height / selmon->w.height);
|
||||||
|
selmon = c->mon;
|
||||||
c->geom = setclient_coordinate_center(c->geom);
|
c->geom = setclient_coordinate_center(c->geom);
|
||||||
resize(c, c->geom, 1);
|
resize(c, c->geom, 1);
|
||||||
|
} else {
|
||||||
|
selmon = c->mon;
|
||||||
|
arrange(selmon, false);
|
||||||
}
|
}
|
||||||
warp_cursor_to_selmon(c->mon);
|
warp_cursor_to_selmon(c->mon);
|
||||||
focusclient(c, 1);
|
focusclient(c, 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue