Use 32-bit visuals for i3bar when possible and allow RGBA colors.
This patch creates all necessary windows for i3bar with 32-bit visuals if available. It also introduces the possibility to define RGBA colors (next to RGB colors), which allows the user to set the opacity of any color. This requires running a compositor. With this patch we also start supporting _NET_SYSTEM_TRAY_VISUAL, which is necessary for the tray icons so they create the tray window with the correct depth and visual.
This commit is contained in:
@ -161,7 +161,7 @@ static void update_placeholder_contents(placeholder_state *state) {
|
||||
DLOG("con %p (placeholder 0x%08x) line %d: %s\n", state->con, state->window, n, serialized);
|
||||
|
||||
i3String *str = i3string_from_utf8(serialized);
|
||||
draw_text(str, state->pixmap, state->gc, 2, (n * (config.font.height + 2)) + 2, state->rect.width - 2);
|
||||
draw_text(str, state->pixmap, state->gc, NULL, 2, (n * (config.font.height + 2)) + 2, state->rect.width - 2);
|
||||
i3string_free(str);
|
||||
n++;
|
||||
free(serialized);
|
||||
@ -172,7 +172,7 @@ static void update_placeholder_contents(placeholder_state *state) {
|
||||
int text_width = predict_text_width(line);
|
||||
int x = (state->rect.width / 2) - (text_width / 2);
|
||||
int y = (state->rect.height / 2) - (config.font.height / 2);
|
||||
draw_text(line, state->pixmap, state->gc, x, y, text_width);
|
||||
draw_text(line, state->pixmap, state->gc, NULL, x, y, text_width);
|
||||
i3string_free(line);
|
||||
xcb_flush(conn);
|
||||
xcb_aux_sync(conn);
|
||||
|
Reference in New Issue
Block a user