better variable readability for taginning,tagouting and tagouted variables

This commit is contained in:
Yujonpradhananga 2026-02-08 13:59:08 +05:45
parent cf8d6f9a18
commit cac7325ca9
4 changed files with 37 additions and 37 deletions

View file

@ -232,8 +232,8 @@ void buffer_set_effect(Client *c, BufferData data) {
if (!c || c->iskilling) if (!c || c->iskilling)
return; return;
if (c->animation.tagouting || c->animation.tagouted || if (c->animation.tagging_out || c->animation.tagging_out ||
c->animation.tagining) { c->animation.tagging_in) {
data.should_scale = false; data.should_scale = false;
} }
@ -450,8 +450,8 @@ struct ivec2 clip_to_hide(Client *c, struct wlr_box *clip_box) {
int32_t offsetx = 0, offsety = 0, offsetw = 0, offseth = 0; int32_t offsetx = 0, offsety = 0, offsetw = 0, offseth = 0;
struct ivec2 offset = {0, 0, 0, 0}; struct ivec2 offset = {0, 0, 0, 0};
if (!ISSCROLLTILED(c) && !c->animation.tagining && !c->animation.tagouted && if (!ISSCROLLTILED(c) && !c->animation.tagging_in && !c->animation.tagging_out &&
!c->animation.tagouting) !c->animation.tagging_out)
return offset; return offset;
int32_t bottom_out_offset = int32_t bottom_out_offset =
@ -471,8 +471,8 @@ struct ivec2 clip_to_hide(Client *c, struct wlr_box *clip_box) {
border超出屏幕的时候不计算如偏差之内而是 border超出屏幕的时候不计算如偏差之内而是
*/ */
if (ISSCROLLTILED(c) || c->animation.tagining || c->animation.tagouted || if (ISSCROLLTILED(c) || c->animation.tagging_in || c->animation.tagging_out ||
c->animation.tagouting) { c->animation.tagging_out) {
if (left_out_offset > 0) { if (left_out_offset > 0) {
offsetx = GEZERO(left_out_offset - bw); offsetx = GEZERO(left_out_offset - bw);
clip_box->x = clip_box->x + offsetx; clip_box->x = clip_box->x + offsetx;
@ -499,7 +499,7 @@ struct ivec2 clip_to_hide(Client *c, struct wlr_box *clip_box) {
offset.height = offseth; offset.height = offseth;
if ((clip_box->width + bw <= 0 || clip_box->height + bw <= 0) && if ((clip_box->width + bw <= 0 || clip_box->height + bw <= 0) &&
(ISSCROLLTILED(c) || c->animation.tagouting || c->animation.tagining)) { (ISSCROLLTILED(c) || c->animation.tagging_out || c->animation.tagging_in)) {
c->is_clip_to_hide = true; c->is_clip_to_hide = true;
wlr_scene_node_set_enabled(&c->scene->node, false); wlr_scene_node_set_enabled(&c->scene->node, false);
} else if (c->is_clip_to_hide && VISIBLEON(c, c->mon)) { } else if (c->is_clip_to_hide && VISIBLEON(c, c->mon)) {
@ -730,14 +730,14 @@ void client_animation_next_tick(Client *c) {
// it's still in the opening animation in resize // it's still in the opening animation in resize
c->animation.action = MOVE; c->animation.action = MOVE;
c->animation.tagining = false; c->animation.tagging_in = false;
c->animation.running = false; c->animation.running = false;
if (c->animation.tagouting) { if (c->animation.tagging_out) {
c->animation.tagouting = false; c->animation.tagging_out = false;
wlr_scene_node_set_enabled(&c->scene->node, false); wlr_scene_node_set_enabled(&c->scene->node, false);
client_set_suspended(c, true); client_set_suspended(c, true);
c->animation.tagouted = true; c->animation.tagging_out = true;
c->animation.current = c->geom; c->animation.current = c->geom;
} }
@ -869,7 +869,7 @@ void client_set_pending_state(Client *c) {
// 判断是否需要动画 // 判断是否需要动画
if (!animations) { if (!animations) {
c->animation.should_animate = false; c->animation.should_animate = false;
} else if (animations && c->animation.tagining) { } else if (animations && c->animation.tagging_in) {
c->animation.should_animate = true; c->animation.should_animate = true;
} else if (!animations || c == grabc || } else if (!animations || c == grabc ||
(!c->is_pending_open_animation && (!c->is_pending_open_animation &&
@ -947,13 +947,13 @@ void resize(Client *c, struct wlr_box geo, int32_t interact) {
c->animation.begin_fade_in = false; c->animation.begin_fade_in = false;
} }
if (c->animation.action == OPEN && !c->animation.tagining && if (c->animation.action == OPEN && !c->animation.tagging_in &&
!c->animation.tagouting && wlr_box_equal(&c->geom, &c->current)) { !c->animation.tagging_out && wlr_box_equal(&c->geom, &c->current)) {
c->animation.action = c->animation.action; c->animation.action = c->animation.action;
} else if (c->animation.tagouting) { } else if (c->animation.tagging_out) {
c->animation.duration = animation_duration_tag; c->animation.duration = animation_duration_tag;
c->animation.action = TAG; c->animation.action = TAG;
} else if (c->animation.tagining) { } else if (c->animation.tagging_in) {
c->animation.duration = animation_duration_tag; c->animation.duration = animation_duration_tag;
c->animation.action = TAG; c->animation.action = TAG;
} else if (c->is_pending_open_animation) { } else if (c->is_pending_open_animation) {
@ -965,9 +965,9 @@ void resize(Client *c, struct wlr_box geo, int32_t interact) {
} }
// 动画起始位置大小设置 // 动画起始位置大小设置
if (c->animation.tagouting) { if (c->animation.tagging_out) {
c->animainit_geom = c->animation.current; c->animainit_geom = c->animation.current;
} else if (c->animation.tagining) { } else if (c->animation.tagging_in) {
c->animainit_geom.height = c->animation.current.height; c->animainit_geom.height = c->animation.current.height;
c->animainit_geom.width = c->animation.current.width; c->animainit_geom.width = c->animation.current.width;
} else if (c->is_pending_open_animation) { } else if (c->is_pending_open_animation) {
@ -1006,7 +1006,7 @@ void resize(Client *c, struct wlr_box geo, int32_t interact) {
} }
// 如果不是工作区切换时划出去的窗口,就让动画的结束位置,就是上面的真实位置和大小 // 如果不是工作区切换时划出去的窗口,就让动画的结束位置,就是上面的真实位置和大小
// c->pending 决定动画的终点一般在其他调用resize的函数的附近设置了 // c->pending 决定动画的终点一般在其他调用resize的函数的附近设置了
if (!c->animation.tagouting && !c->iskilling) { if (!c->animation.tagging_out && !c->iskilling) {
c->pending = c->geom; c->pending = c->geom;
} }

View file

@ -40,7 +40,7 @@ void set_arrange_visible(Monitor *m, Client *c, bool want_animation) {
if (!c->animation.tag_from_rule && want_animation && if (!c->animation.tag_from_rule && want_animation &&
m->pertag->prevtag != 0 && m->pertag->curtag != 0 && animations) { m->pertag->prevtag != 0 && m->pertag->curtag != 0 && animations) {
c->animation.tagining = true; c->animation.tagging_in = true;
set_tagin_animation(m, c); set_tagin_animation(m, c);
} else { } else {
c->animainit_geom.x = c->animation.current.x; c->animainit_geom.x = c->animation.current.x;
@ -48,8 +48,8 @@ void set_arrange_visible(Monitor *m, Client *c, bool want_animation) {
} }
c->animation.tag_from_rule = false; c->animation.tag_from_rule = false;
c->animation.tagouting = false; c->animation.tagging_out = false;
c->animation.tagouted = false; c->animation.tagging_out = false;
resize(c, c->geom, 0); resize(c, c->geom, 0);
} }
@ -83,8 +83,8 @@ void set_tagout_animation(Monitor *m, Client *c) {
void set_arrange_hidden(Monitor *m, Client *c, bool want_animation) { void set_arrange_hidden(Monitor *m, Client *c, bool want_animation) {
if ((c->tags & (1 << (m->pertag->prevtag - 1))) && if ((c->tags & (1 << (m->pertag->prevtag - 1))) &&
m->pertag->prevtag != 0 && m->pertag->curtag != 0 && animations) { m->pertag->prevtag != 0 && m->pertag->curtag != 0 && animations) {
c->animation.tagouting = true; c->animation.tagging_out = true;
c->animation.tagining = false; c->animation.tagging_in = false;
set_tagout_animation(m, c); set_tagout_animation(m, c);
} else { } else {
wlr_scene_node_set_enabled(&c->scene->node, false); wlr_scene_node_set_enabled(&c->scene->node, false);

View file

@ -754,8 +754,8 @@ arrange(Monitor *m, bool want_animation, bool from_view) {
} }
} }
if (c->mon == m && c->ismaximizescreen && !c->animation.tagouted && if (c->mon == m && c->ismaximizescreen && !c->animation.tagged_out &&
!c->animation.tagouting && VISIBLEON(c, m)) { !c->animation.tagging_out && VISIBLEON(c, m)) {
reset_maximizescreen_size(c); reset_maximizescreen_size(c);
} }
} }

View file

@ -271,9 +271,9 @@ typedef struct {
struct dwl_animation { struct dwl_animation {
bool should_animate; bool should_animate;
bool running; bool running;
bool tagining; bool tagging_in;
bool tagouted; bool tagged_out;
bool tagouting; bool tagging_out;
bool begin_fade_in; bool begin_fade_in;
bool tag_from_rule; bool tag_from_rule;
uint32_t time_started; uint32_t time_started;
@ -2070,7 +2070,7 @@ void checkidleinhibitor(struct wlr_surface *exclude) {
} }
struct wlr_scene_tree *tree = surface->data; struct wlr_scene_tree *tree = surface->data;
if (!tree || (tree->node.enabled && (!c || !c->animation.tagouting))) { if (!tree || (tree->node.enabled && (!c || !c->animation.tagging_out))) {
inhibited = 1; inhibited = 1;
break; break;
} }
@ -2458,8 +2458,8 @@ void commitnotify(struct wl_listener *listener, void *data) {
return; return;
} }
if (!c || c->iskilling || c->animation.tagouting || c->animation.tagouted || if (!c || c->iskilling || c->animation.tagging_out || c->animation.tagged_out ||
c->animation.tagining) c->animation.tagging_in)
return; return;
if (c->configure_serial && if (c->configure_serial &&
@ -4283,7 +4283,7 @@ void pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy,
struct timespec now; struct timespec now;
if (sloppyfocus && !start_drag_window && c && time && if (sloppyfocus && !start_drag_window && c && time &&
c->scene->node.enabled && !c->animation.tagining && c->scene->node.enabled && !c->animation.tagging_in &&
(surface != seat->pointer_state.focused_surface) && (surface != seat->pointer_state.focused_surface) &&
!client_is_unmanaged(c) && VISIBLEON(c, c->mon)) !client_is_unmanaged(c) && VISIBLEON(c, c->mon))
focusclient(c, 0); focusclient(c, 0);
@ -5477,9 +5477,9 @@ void overview_backup(Client *c) {
c->overview_isfullscreenbak = c->isfullscreen; c->overview_isfullscreenbak = c->isfullscreen;
c->overview_ismaximizescreenbak = c->ismaximizescreen; c->overview_ismaximizescreenbak = c->ismaximizescreen;
c->overview_isfullscreenbak = c->isfullscreen; c->overview_isfullscreenbak = c->isfullscreen;
c->animation.tagining = false; c->animation.tagging_in = false;
c->animation.tagouted = false; c->animation.tagged_out = false;
c->animation.tagouting = false; c->animation.tagging_out = false;
c->overview_backup_geom = c->geom; c->overview_backup_geom = c->geom;
c->overview_backup_bw = c->bw; c->overview_backup_bw = c->bw;
if (c->isfloating) { if (c->isfloating) {
@ -5502,7 +5502,7 @@ void overview_restore(Client *c, const Arg *arg) {
c->overview_ismaximizescreenbak = 0; c->overview_ismaximizescreenbak = 0;
c->geom = c->overview_backup_geom; c->geom = c->overview_backup_geom;
c->bw = c->overview_backup_bw; c->bw = c->overview_backup_bw;
c->animation.tagining = false; c->animation.tagging_in = false;
c->is_restoring_from_ov = (arg->ui & c->tags & TAGMASK) == 0 ? true : false; c->is_restoring_from_ov = (arg->ui & c->tags & TAGMASK) == 0 ? true : false;
if (c->isfloating) { if (c->isfloating) {