mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-09 10:07:13 -05:00
fix: border color not change when focus change when disable animaitons
This commit is contained in:
parent
1b0067eff1
commit
eb7c7b83d6
1 changed files with 12 additions and 0 deletions
|
|
@ -901,6 +901,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));
|
||||
|
|
@ -926,6 +932,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