fix for no animations

This commit is contained in:
DreamMaoMao 2026-05-19 13:26:21 +08:00
parent c9a14ed38a
commit fc75ecb1eb
2 changed files with 12 additions and 8 deletions

View file

@ -813,7 +813,7 @@ void client_apply_clip(Client *c, float factor) {
enum corner_location current_corner_location = enum corner_location current_corner_location =
set_client_corner_location(c); set_client_corner_location(c);
if (!config.animations) { if (!config.animations && !c->mon->isoverview) {
c->animation.running = false; c->animation.running = false;
c->need_output_flush = false; c->need_output_flush = false;
c->animainit_geom = c->current = c->pending = c->animation.current = c->animainit_geom = c->current = c->pending = c->animation.current =
@ -1176,13 +1176,12 @@ void client_set_pending_state(Client *c) {
if (!c || c->iskilling) if (!c || c->iskilling)
return; return;
if (!config.animations) { if (!config.animations && !c->mon->isoverview) {
c->animation.should_animate = false; c->animation.should_animate = false;
} else if (config.animations && c->animation.tagining) { } else if (config.animations && c->animation.tagining) {
c->animation.should_animate = true; c->animation.should_animate = true;
} else if (!config.animations || c == grabc || } else if (c == grabc || (!c->is_pending_open_animation &&
(!c->is_pending_open_animation && wlr_box_equal(&c->current, &c->pending))) {
wlr_box_equal(&c->current, &c->pending))) {
c->animation.should_animate = false; c->animation.should_animate = false;
} else { } else {
c->animation.should_animate = true; c->animation.should_animate = true;
@ -1344,11 +1343,15 @@ void resize(Client *c, struct wlr_box geo, int32_t interact) {
c->animainit_geom = c->geom; c->animainit_geom = c->geom;
} }
if (c->mon->isoverview && c != c->mon->sel && if (config.animations && c->mon->isoverview && c != c->mon->sel &&
c->animation.action == OVERVIEW) { c->animation.action == OVERVIEW) {
set_overview_enter_animation(c); set_overview_enter_animation(c);
} }
if (!config.animations && c->mon->isoverview) {
c->animainit_geom = c->geom;
}
// 开始应用动画设置 // 开始应用动画设置
client_set_pending_state(c); client_set_pending_state(c);
@ -1506,7 +1509,7 @@ bool client_draw_frame(Client *c) {
return client_apply_focus_opacity(c); return client_apply_focus_opacity(c);
} }
if (config.animations && c->animation.running) { if ((config.animations || c->mon->isoverview) && c->animation.running) {
client_animation_next_tick(c); client_animation_next_tick(c);
} else { } else {
wlr_scene_node_set_position(&c->scene->node, c->pending.x, wlr_scene_node_set_position(&c->scene->node, c->pending.x,

View file

@ -4857,7 +4857,8 @@ void pointerfocus(Client *c, struct wlr_surface *surface, double sx, double sy,
if (config.sloppyfocus && !start_drag_window && c && time && c->scene && if (config.sloppyfocus && !start_drag_window && c && time && c->scene &&
c->scene->node.enabled && !c->animation.tagining && c->scene->node.enabled && !c->animation.tagining &&
(surface != seat->pointer_state.focused_surface || (selmon && selmon->isoverview && selmon->sel != c)) && (surface != seat->pointer_state.focused_surface ||
(selmon && selmon->isoverview && selmon->sel != c)) &&
!client_is_unmanaged(c) && VISIBLEON(c, c->mon)) !client_is_unmanaged(c) && VISIBLEON(c, c->mon))
focusclient(c, 0); focusclient(c, 0);