aboutsummaryrefslogtreecommitdiffstats
path: root/font.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--font.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/font.c b/font.c
index 1200bf7..eb61d06 100644
--- a/font.c
+++ b/font.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: font.c,v 1.26 2013/05/14 12:35:56 okan Exp $
+ * $OpenBSD: font.c,v 1.27 2013/05/19 23:09:59 okan Exp $
*/
#include <sys/param.h>
@@ -31,11 +31,8 @@
#include "calmwm.h"
void
-font_init(struct screen_ctx *sc, const char *name, const char **color)
+font_init(struct screen_ctx *sc, const char *name)
{
- int i;
- XRenderColor c;
-
sc->xftdraw = XftDrawCreate(X_Dpy, sc->rootwin,
sc->visual, sc->colormap);
if (sc->xftdraw == NULL)
@@ -44,23 +41,6 @@ font_init(struct screen_ctx *sc, const char *name, const char **color)
sc->xftfont = XftFontOpenName(X_Dpy, sc->which, name);
if (sc->xftfont == NULL)
errx(1, "XftFontOpenName");
-
- for (i = 0; i < CWM_COLOR_MENU_MAX; i++) {
- if (*color[i] == '\0')
- break;
- if (!XftColorAllocName(X_Dpy, sc->visual, sc->colormap,
- color[i], &sc->xftcolor[i]))
- errx(1, "XftColorAllocName");
- }
- if (i == CWM_COLOR_MENU_MAX)
- return;
-
- xu_xorcolor(sc->xftcolor[CWM_COLOR_MENU_BG].color,
- sc->xftcolor[CWM_COLOR_MENU_FG].color, &c);
- xu_xorcolor(sc->xftcolor[CWM_COLOR_MENU_FONT].color, c, &c);
- if (!XftColorAllocValue(X_Dpy, sc->visual, sc->colormap,
- &c, &sc->xftcolor[CWM_COLOR_MENU_FONT_SEL]))
- errx(1, "XftColorAllocValue");
}
int