fix:wrong animation init offset of direction animaiton

This commit is contained in:
DreamMaoMao
2025-02-06 13:06:26 +08:00
parent 23d261e26b
commit f7ccaca144

8
main.c
View File

@@ -3759,18 +3759,18 @@ void set_open_animaiton(Client *c, struct wlr_box geo) {
{ {
case UP: case UP:
c->animainit_geom.x = c->geom.x; c->animainit_geom.x = c->geom.x;
c->animainit_geom.y = 0 - c->geom.height; c->animainit_geom.y = c->mon->m.y - c->geom.height;
break; break;
case DOWN: case DOWN:
c->animainit_geom.x = c->geom.x; c->animainit_geom.x = c->geom.x;
c->animainit_geom.y = c->mon->w.y + c->mon->w.height + c->geom.height; c->animainit_geom.y = c->geom.y + c->mon->m.height -(c->geom.y -c->mon->m.y);
break; break;
case LEFT: case LEFT:
c->animainit_geom.x = 0 - c->geom.width; c->animainit_geom.x = c->mon->m.x - c->geom.width;
c->animainit_geom.y = c->geom.y; c->animainit_geom.y = c->geom.y;
break; break;
case RIGHT: case RIGHT:
c->animainit_geom.x = c->mon->w.x + c->mon->w.width + c->geom.width; c->animainit_geom.x = c->geom.x + c->mon->m.width -(c->geom.x -c->mon->m.x);
c->animainit_geom.y = c->geom.y; c->animainit_geom.y = c->geom.y;
break; break;
default: default: