mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-05 04:06:28 -05:00
fix: border color not change when focus change when disable animaitons
This commit is contained in:
parent
9c7436ba71
commit
cca92ec50d
1 changed files with 12 additions and 0 deletions
|
|
@ -1023,6 +1023,12 @@ bool client_draw_fadeout_frame(Client *c) {
|
|||
|
||||
void client_set_focused_opacity_animation(Client *c) {
|
||||
float *border_color = get_border_color(c);
|
||||
|
||||
if (!animations) {
|
||||
setborder_color(c);
|
||||
return;
|
||||
}
|
||||
|
||||
c->opacity_animation.duration = animation_duration_focus;
|
||||
memcpy(c->opacity_animation.target_border_color, border_color,
|
||||
sizeof(c->opacity_animation.target_border_color));
|
||||
|
|
@ -1048,6 +1054,12 @@ void client_set_focused_opacity_animation(Client *c) {
|
|||
void cleint_set_unfocused_opacity_animation(Client *c) {
|
||||
// Start border color animation to unfocused
|
||||
float *border_color = get_border_color(c);
|
||||
|
||||
if (!animations) {
|
||||
setborder_color(c);
|
||||
return;
|
||||
}
|
||||
|
||||
c->opacity_animation.duration = animation_duration_focus;
|
||||
memcpy(c->opacity_animation.target_border_color, border_color,
|
||||
sizeof(c->opacity_animation.target_border_color));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue