Don’t check twice for client.focused, change all places were colorcodes are used

This commit is contained in:
Michael Stapelberg 2009-05-31 17:18:49 +02:00
parent 0cb5d7448d
commit 517c47ca95
2 changed files with 2 additions and 3 deletions

View File

@ -125,7 +125,6 @@ void load_configuration(const char *override_configpath) {
OPTION_COLORTRIPLE("client.focused", client.focused); OPTION_COLORTRIPLE("client.focused", client.focused);
OPTION_COLORTRIPLE("client.focused_inactive", client.focused_inactive); OPTION_COLORTRIPLE("client.focused_inactive", client.focused_inactive);
OPTION_COLORTRIPLE("client.unfocused", client.unfocused); OPTION_COLORTRIPLE("client.unfocused", client.unfocused);
OPTION_COLORTRIPLE("client.focused", client.focused);
OPTION_COLORTRIPLE("bar.focused", bar.focused); OPTION_COLORTRIPLE("bar.focused", bar.focused);
OPTION_COLORTRIPLE("bar.unfocused", bar.unfocused); OPTION_COLORTRIPLE("bar.unfocused", bar.unfocused);

View File

@ -793,9 +793,9 @@ int handle_expose_event(void *data, xcb_connection_t *conn, xcb_expose_event_t *
uint32_t background_color; uint32_t background_color;
/* Distinguish if the window is currently focused… */ /* Distinguish if the window is currently focused… */
if (CUR_CELL->currently_focused == client) if (CUR_CELL->currently_focused == client)
background_color = get_colorpixel(conn, "#285577"); background_color = get_colorpixel(conn, config.client.focused.background);
/* …or if it is the focused window in a not focused container */ /* …or if it is the focused window in a not focused container */
else background_color = get_colorpixel(conn, "#555555"); else background_color = get_colorpixel(conn, config.client.focused_inactive.background);
/* Set foreground color to current focused color, line width to 2 */ /* Set foreground color to current focused color, line width to 2 */
uint32_t values[] = {background_color, 2}; uint32_t values[] = {background_color, 2};