opt: optimize var name

This commit is contained in:
DreamMaoMao 2025-07-15 16:18:16 +08:00
parent 669095a157
commit 53c6442ca3
4 changed files with 10 additions and 10 deletions

View file

@ -701,7 +701,7 @@ void client_animation_next_tick(Client *c) {
.height = height,
};
c->is_open_animation = false;
c->is_pending_open_animation = false;
if (animation_passed == 1.0) {
@ -862,7 +862,7 @@ void client_set_pending_state(Client *c) {
} else if (animations && c->animation.tagining) {
c->animation.should_animate = true;
} else if (!animations || c == grabc ||
(!c->is_open_animation &&
(!c->is_pending_open_animation &&
wlr_box_equal(&c->current, &c->pending))) {
c->animation.should_animate = false;
} else {
@ -915,7 +915,7 @@ void resize(Client *c, struct wlr_box geo, int interact) {
bbox); // 去掉这个推荐的窗口大小,因为有时推荐的窗口特别大导致平铺异常
}
if (!c->is_open_animation) {
if (!c->is_pending_open_animation) {
c->animation.begin_fade_in = false;
}
@ -928,7 +928,7 @@ void resize(Client *c, struct wlr_box geo, int interact) {
} else if (c->animation.tagining) {
c->animation.duration = animation_duration_tag;
c->animation.action = TAG;
} else if (c->is_open_animation) {
} else if (c->is_pending_open_animation) {
c->animation.duration = animation_duration_open;
c->animation.action = OPEN;
} else {
@ -942,7 +942,7 @@ void resize(Client *c, struct wlr_box geo, int interact) {
} else if (c->animation.tagining) {
c->animainit_geom.height = c->animation.current.height;
c->animainit_geom.width = c->animation.current.width;
} else if (c->is_open_animation) {
} else if (c->is_pending_open_animation) {
set_client_open_animaiton(c, c->geom);
} else {
c->animainit_geom = c->animation.current;

View file

@ -375,7 +375,7 @@ void scroller(Monitor *m) {
for (i = 0; i < n; i++) {
c = tempClients[i];
if (root_client == c) {
if (!c->is_open_animation &&
if (!c->is_pending_open_animation &&
c->geom.x >= m->w.x + scroller_structs &&
c->geom.x + c->geom.width <=
m->w.x + m->w.width - scroller_structs) {

View file

@ -360,7 +360,7 @@ void vertical_scroller(Monitor *m) {
for (i = 0; i < n; i++) {
c = tempClients[i];
if (root_client == c) {
if (!c->is_open_animation &&
if (!c->is_pending_open_animation &&
c->geom.y >= m->w.y + scroller_structs &&
c->geom.y + c->geom.height <=
m->w.y + m->w.height - scroller_structs) {

View file

@ -291,7 +291,7 @@ struct Client {
int iskilling;
int isnamedscratchpad;
struct wlr_box bounds;
bool is_open_animation;
bool is_pending_open_animation;
bool is_restoring_from_ov;
float scroller_proportion;
bool need_output_flush;
@ -3888,7 +3888,7 @@ void init_client_properties(Client *c) {
c->isurgent = 0;
c->need_output_flush = 0;
c->scroller_proportion = scroller_default_proportion;
c->is_open_animation = true;
c->is_pending_open_animation = true;
c->drag_to_tile = false;
c->fake_no_border = false;
c->focused_opacity = focused_opacity;
@ -3998,7 +3998,7 @@ mapnotify(struct wl_listener *listener, void *data) {
}
// make sure the animation is open type
c->is_open_animation = true;
c->is_pending_open_animation = true;
resize(c, c->geom, 0);
printstatus();
}