feat: add animated focus transitions for window titles and taskbar colors

This commit is contained in:
2026-01-26 22:16:04 +00:00
parent eaa41d70ea
commit ce6729c53c
22 changed files with 293 additions and 14 deletions
+6 -4
View File
@@ -46,6 +46,8 @@ void decorations_render(Client *client, bool focused)
void decorations_render_title_bar(Client *client, bool focused)
{
(void)focused;
if (client == NULL || client->frame == None) {
return;
}
@@ -59,8 +61,8 @@ void decorations_render_title_bar(Client *client, bool focused)
int title_height = config_get_title_height();
int border = client->border_width;
unsigned long bg_color = focused ? colors->title_focused_bg : colors->title_unfocused_bg;
unsigned long fg_color = focused ? colors->title_focused_fg : colors->title_unfocused_fg;
unsigned long bg_color = client_get_animated_title_color(client);
unsigned long fg_color = adjust_color_for_background(colors->title_focused_fg, bg_color);
XSetForeground(dpy, dwn->gc, bg_color);
XFillRectangle(dpy, client->frame, dwn->gc,
@@ -147,7 +149,7 @@ void decorations_render_buttons(Client *client, bool focused)
}
Display *dpy = dwn->display;
const ColorScheme *colors = config_get_colors();
(void)focused;
int title_height = config_get_title_height();
int border = client->border_width;
@@ -160,7 +162,7 @@ void decorations_render_buttons(Client *client, bool focused)
return;
}
unsigned long bg_color = focused ? colors->title_focused_bg : colors->title_unfocused_bg;
unsigned long bg_color = client_get_animated_title_color(client);
XSetForeground(dpy, dwn->gc, bg_color);
XFillRectangle(dpy, client->frame, dwn->gc, close_x, button_y, BUTTON_SIZE, BUTTON_SIZE);