mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-01 22:58:44 -04:00
fix: error clip of zoom in animation
This commit is contained in:
parent
da37332082
commit
038951c4e8
1 changed files with 13 additions and 13 deletions
26
maomao.c
26
maomao.c
|
|
@ -973,12 +973,12 @@ void apply_border(Client *c, struct wlr_box clip_box, int offsetx,
|
|||
if (c->animation.running && c->animation.action != MOVE) {
|
||||
if (c->animation.current.x < c->mon->m.x) {
|
||||
wlr_scene_rect_set_size(c->border[2], 0, 0);
|
||||
} else if (c->animation.current.x + c->geom.width >
|
||||
} else if (c->animation.current.x + c->animation.current.width >
|
||||
c->mon->m.x + c->mon->m.width) {
|
||||
wlr_scene_rect_set_size(c->border[3], 0, 0);
|
||||
} else if (c->animation.current.y < c->mon->m.y) {
|
||||
wlr_scene_rect_set_size(c->border[0], 0, 0);
|
||||
} else if (c->animation.current.y + c->geom.height >
|
||||
} else if (c->animation.current.y + c->animation.current.height >
|
||||
c->mon->m.y + c->mon->m.height) {
|
||||
wlr_scene_rect_set_size(c->border[1], 0, 0);
|
||||
}
|
||||
|
|
@ -1028,13 +1028,13 @@ void client_apply_clip(Client *c) {
|
|||
clip_box.y = 0;
|
||||
}
|
||||
|
||||
// make tagout tagin animations not visible in other monitors
|
||||
// // make tagout tagin animations not visible in other monitors
|
||||
if (c->animation.running && c->animation.action != MOVE) {
|
||||
if (c->animation.current.x <= c->mon->m.x) {
|
||||
offsetx = c->mon->m.x - c->animation.current.x;
|
||||
clip_box.x = clip_box.x + offsetx;
|
||||
clip_box.width = clip_box.width - offsetx;
|
||||
} else if (c->animation.current.x + c->geom.width >=
|
||||
} else if (c->animation.current.x + c->animation.current.width >=
|
||||
c->mon->m.x + c->mon->m.width) {
|
||||
clip_box.width = clip_box.width -
|
||||
(c->animation.current.x + c->animation.current.width -
|
||||
|
|
@ -1045,7 +1045,7 @@ void client_apply_clip(Client *c) {
|
|||
offsety = c->mon->m.y - c->animation.current.y;
|
||||
clip_box.y = clip_box.y + offsety;
|
||||
clip_box.height = clip_box.height - offsety;
|
||||
} else if (c->animation.current.y + c->geom.height >=
|
||||
} else if (c->animation.current.y + c->animation.current.height >=
|
||||
c->mon->m.y + c->mon->m.height) {
|
||||
clip_box.height = clip_box.height -
|
||||
(c->animation.current.y + c->animation.current.height -
|
||||
|
|
@ -4199,10 +4199,10 @@ void set_open_animaiton(Client *c, struct wlr_box geo) {
|
|||
int center_x, center_y;
|
||||
if (strcmp(animation_type, "zoom") == 0 ||
|
||||
(c->animation_type && strcmp(c->animation_type, "zoom") == 0)) {
|
||||
c->animainit_geom.width = geo.width * zoom_initial_ratio;
|
||||
c->animainit_geom.height = geo.height * zoom_initial_ratio;
|
||||
c->animainit_geom.x = geo.x + (geo.width - c->animainit_geom.width) / 2;
|
||||
c->animainit_geom.y = geo.y + (geo.height - c->animainit_geom.height) / 2;
|
||||
c->animainit_geom.width = c->geom.width * zoom_initial_ratio;
|
||||
c->animainit_geom.height = c->geom.height * zoom_initial_ratio;
|
||||
c->animainit_geom.x = c->geom.x + (c->geom.width - c->animainit_geom.width) / 2;
|
||||
c->animainit_geom.y = c->geom.y + (c->geom.height - c->animainit_geom.height) / 2;
|
||||
return;
|
||||
} else {
|
||||
special_direction = is_special_animaiton_rule(c);
|
||||
|
|
@ -5880,11 +5880,11 @@ void init_fadeout_client(Client *c) {
|
|||
fadeout_cient->current.x = 0; // x无偏差,垂直划出
|
||||
} else {
|
||||
fadeout_cient->current.y =
|
||||
(c->geom.height - c->geom.height * zoom_initial_ratio) / 2;
|
||||
(fadeout_cient->geom.height - fadeout_cient->geom.height * zoom_initial_ratio) / 2;
|
||||
fadeout_cient->current.x =
|
||||
(c->geom.width - c->geom.width * zoom_initial_ratio) / 2;
|
||||
fadeout_cient->current.width = c->geom.width * zoom_initial_ratio;
|
||||
fadeout_cient->current.height = c->geom.height * zoom_initial_ratio;
|
||||
(fadeout_cient->geom.width - fadeout_cient->geom.width * zoom_initial_ratio) / 2;
|
||||
fadeout_cient->current.width = fadeout_cient->geom.width * zoom_initial_ratio;
|
||||
fadeout_cient->current.height = fadeout_cient->geom.height * zoom_initial_ratio;
|
||||
}
|
||||
|
||||
fadeout_cient->animation.passed_frames = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue