mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-18 06:59:53 -05:00
fix: scratchpad_geom windowrule not apply
This commit is contained in:
parent
b94788daf2
commit
bc85232985
1 changed files with 2 additions and 15 deletions
17
src/maomao.c
17
src/maomao.c
|
|
@ -1692,11 +1692,6 @@ void show_scratchpad(Client *c) {
|
||||||
c->bw = c->isnoborder ? 0 : borderpx;
|
c->bw = c->isnoborder ? 0 : borderpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c->oldgeom.width)
|
|
||||||
c->scratchpad_geom.width = c->oldgeom.width;
|
|
||||||
if (c->oldgeom.height)
|
|
||||||
c->scratchpad_geom.height = c->oldgeom.height;
|
|
||||||
|
|
||||||
/* return if fullscreen */
|
/* return if fullscreen */
|
||||||
if (!c->isfloating) {
|
if (!c->isfloating) {
|
||||||
setfloating(c, 1);
|
setfloating(c, 1);
|
||||||
|
|
@ -1705,19 +1700,11 @@ void show_scratchpad(Client *c) {
|
||||||
c->geom.height = c->scratchpad_geom.height ? c->scratchpad_geom.height
|
c->geom.height = c->scratchpad_geom.height ? c->scratchpad_geom.height
|
||||||
: c->mon->w.height * 0.8;
|
: c->mon->w.height * 0.8;
|
||||||
// 重新计算居中的坐标
|
// 重新计算居中的坐标
|
||||||
c->geom = c->animainit_geom = c->animation.current =
|
c->oldgeom = c->geom = c->animainit_geom = c->animation.current =
|
||||||
setclient_coordinate_center(c, c->geom, 0, 0);
|
|
||||||
resize(c, c->geom, 0);
|
|
||||||
} else if (c->geom.width != c->scratchpad_geom.width ||
|
|
||||||
c->geom.height != c->scratchpad_geom.height) {
|
|
||||||
c->geom.width = c->scratchpad_geom.width ? c->scratchpad_geom.width
|
|
||||||
: c->mon->w.width * 0.7;
|
|
||||||
c->geom.height = c->scratchpad_geom.height ? c->scratchpad_geom.height
|
|
||||||
: c->mon->w.height * 0.8;
|
|
||||||
c->geom = c->animainit_geom = c->animation.current =
|
|
||||||
setclient_coordinate_center(c, c->geom, 0, 0);
|
setclient_coordinate_center(c, c->geom, 0, 0);
|
||||||
resize(c, c->geom, 0);
|
resize(c, c->geom, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
c->oldtags = selmon->tagset[selmon->seltags];
|
c->oldtags = selmon->tagset[selmon->seltags];
|
||||||
wl_list_remove(&c->link); // 从原来位置移除
|
wl_list_remove(&c->link); // 从原来位置移除
|
||||||
wl_list_insert(clients.prev->next, &c->link); // 插入开头
|
wl_list_insert(clients.prev->next, &c->link); // 插入开头
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue