mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-03 07:15:44 -04:00
opt: avoid Unnecessary calculation
This commit is contained in:
parent
65d2642064
commit
58e0227a1f
1 changed files with 4 additions and 1 deletions
|
|
@ -3353,7 +3353,10 @@ void layer_set_pending_state(LayerSurface *l) {
|
||||||
l->pending = l->geom;
|
l->pending = l->geom;
|
||||||
set_layer_open_animaiton(l, l->geom);
|
set_layer_open_animaiton(l, l->geom);
|
||||||
// 判断是否需要动画
|
// 判断是否需要动画
|
||||||
if (!animations) {
|
if (!animations || l->noanim ||
|
||||||
|
l->layer_surface->current.layer ==
|
||||||
|
ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND ||
|
||||||
|
l->layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM) {
|
||||||
l->animation.should_animate = false;
|
l->animation.should_animate = false;
|
||||||
} else {
|
} else {
|
||||||
l->animation.should_animate = true;
|
l->animation.should_animate = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue