opt: not apply animationa action when xdg toplevel is initing

This commit is contained in:
DreamMaoMao 2026-03-20 23:24:06 +08:00
parent ccefa572e1
commit 2bd9d2d292
2 changed files with 12 additions and 0 deletions

View file

@ -1182,6 +1182,10 @@ bool client_draw_frame(Client *c) {
if (!c || !client_surface(c)->mapped)
return false;
if (c->animation.running && client_is_initing(c)) {
return true;
}
if (!c->need_output_flush) {
return client_apply_focus_opacity(c);
}

View file

@ -491,6 +491,14 @@ static inline bool client_request_maximize(Client *c, void *data) {
return c->surface.xdg->toplevel->requested.maximized;
}
static inline bool client_is_initing(Client *c) {
#ifdef XWAYLAND
if (client_is_x11(c))
return false;
#endif
return c->surface.xdg->initial_commit;
}
static inline void client_set_size_bound(Client *c) {
struct wlr_xdg_toplevel *toplevel;
struct wlr_xdg_toplevel_state state;