diff --git a/config.def.h b/config.def.h index 7903911..b66da31 100644 --- a/config.def.h +++ b/config.def.h @@ -8,8 +8,10 @@ /* animation */ static const bool animations = true; // Enable animations static const char *animation_type = "slide"; //slide or zoom -static const char animation_fade_in = 1; // Enable animation fade in +static const char animation_fade_in = 0; // Enable animation fade in static const float zoom_initial_ratio = 0.5; // Initial window ratio for animations +static const float fadeout_begin_opacity = 1; // Begin opacity for animations fadeout +static const float fadein_begin_opacity = 0; // Begin opacity for animations fasdein static const uint32_t animation_duration_move = 300; // Animation move speed static const uint32_t animation_duration_open = 300; // Animation open speed static const uint32_t animation_duration_close = 200; // Animation close speed diff --git a/main.c b/main.c index ef6dd1a..6b67d17 100644 --- a/main.c +++ b/main.c @@ -690,11 +690,11 @@ client_animation_next_tick(Client *c) if(!c->iskilling && (c->is_open_animation||c->animation.begin_fade_in) && animation_fade_in) { c->animation.begin_fade_in = true; - client_set_opacity(c,animation_passed); + client_set_opacity(c,MIN(animation_passed + fadein_begin_opacity,1.0)); } if(c->iskilling) { - client_set_opacity(c,1 - animation_passed ); + client_set_opacity(c,MAX(fadeout_begin_opacity - animation_passed ,0.1) ); } c->is_open_animation = false; @@ -2901,7 +2901,7 @@ void pending_kill_client(Client *c) { c->iskilling = 1; c->animainit_geom = c->geom; c->pending = c->geom; - c->pending.y = c->geom.y + c->mon->m.height; + c->pending.y = c->geom.y + c->mon->m.height -(c->geom.y -c->mon->m.y); if (c == grabc) { cursor_mode = CurNormal; @@ -3831,7 +3831,7 @@ resize(Client *c, struct wlr_box geo, int interact) } - if(c->isnoborder) { + if(c->isnoborder || c->iskilling) { c->bw = 0; }