- switch border colors to Xft

- merge border/menu color structures/functions since they now both use Xft
- switch xu_xorcolor to operating on XftColor instead of just
  XRenderColor (basically adding pixel)
- if color name allocation fails, revert back to default (this, along
  with font validation should occur during config parse, but we don't
  have screens setup yet - likely to change at some point)
This commit is contained in:
okan
2013-05-19 23:09:59 +00:00
parent c84145661e
commit dac00a232f
6 changed files with 61 additions and 90 deletions

View File

@ -480,17 +480,17 @@ client_draw_border(struct client_ctx *cc)
if (cc->active)
switch (cc->flags & CLIENT_HIGHLIGHT) {
case CLIENT_GROUP:
pixel = sc->color[CWM_COLOR_BORDER_GROUP];
pixel = sc->xftcolor[CWM_COLOR_BORDER_GROUP].pixel;
break;
case CLIENT_UNGROUP:
pixel = sc->color[CWM_COLOR_BORDER_UNGROUP];
pixel = sc->xftcolor[CWM_COLOR_BORDER_UNGROUP].pixel;
break;
default:
pixel = sc->color[CWM_COLOR_BORDER_ACTIVE];
pixel = sc->xftcolor[CWM_COLOR_BORDER_ACTIVE].pixel;
break;
}
else
pixel = sc->color[CWM_COLOR_BORDER_INACTIVE];
pixel = sc->xftcolor[CWM_COLOR_BORDER_INACTIVE].pixel;
XSetWindowBorderWidth(X_Dpy, cc->win, cc->bwidth);
XSetWindowBorder(X_Dpy, cc->win, pixel);