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
+4
View File
@@ -70,4 +70,8 @@ Client *client_get_prev(Client *client);
Client *client_get_first(void);
Client *client_get_last(void);
void client_start_focus_animation(Client *client, bool gaining_focus);
unsigned long client_get_animated_title_color(Client *client);
void client_update_animations(void);
#endif
+11
View File
@@ -87,6 +87,14 @@ typedef struct {
long timestamp;
} SnapConstraint;
typedef struct {
long start_time;
float progress;
unsigned long from_color;
unsigned long to_color;
bool active;
} ColorAnimation;
typedef struct Client Client;
typedef struct Workspace Workspace;
typedef struct Monitor Monitor;
@@ -106,6 +114,8 @@ struct Client {
char title[256];
char class[64];
SnapConstraint snap;
unsigned long taskbar_color;
ColorAnimation title_anim;
Client *next;
Client *prev;
Client *mru_next;
@@ -166,6 +176,7 @@ typedef struct {
GC gc;
XFontStruct *font;
XftFont *xft_font;
XftFont *xft_font_bold;
Colormap colormap;
Client *drag_client;
+5
View File
@@ -53,6 +53,11 @@ char *expand_path(const char *path);
unsigned long parse_color(const char *color_str);
void color_to_rgb(unsigned long color, int *r, int *g, int *b);
unsigned long rgb_to_pixel(int r, int g, int b);
unsigned long generate_unique_color(void);
unsigned long adjust_color_for_background(unsigned long color, unsigned long bg);
unsigned long interpolate_color(unsigned long from, unsigned long to, float progress);
unsigned long dim_color(unsigned long color, float factor);
long get_time_ms(void);
void sleep_ms(int ms);