summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/cwm/calmwm.h4
-rw-r--r--app/cwm/font.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index bea946741..86e1bc6e3 100644
--- a/app/cwm/calmwm.h
+++ b/app/cwm/calmwm.h
@@ -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: calmwm.h,v 1.165 2012/12/17 02:53:29 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.166 2012/12/17 14:20:52 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -220,7 +220,7 @@ struct screen_ctx {
struct cycle_entry_q mruq;
XftColor xftcolor[CWM_COLOR_MENU_MAX];
XftDraw *xftdraw;
- XftFont *font;
+ XftFont *xftfont;
int xinerama_no;
XineramaScreenInfo *xinerama;
#define CALMWM_NGROUPS 9
diff --git a/app/cwm/font.c b/app/cwm/font.c
index 75d568662..a8b962f60 100644
--- a/app/cwm/font.c
+++ b/app/cwm/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.22 2012/12/17 02:53:29 okan Exp $
+ * $OpenBSD: font.c,v 1.23 2012/12/17 14:20:52 okan Exp $
*/
#include <sys/param.h>
@@ -33,19 +33,19 @@
int
font_ascent(struct screen_ctx *sc)
{
- return (sc->font->ascent);
+ return (sc->xftfont->ascent);
}
int
font_descent(struct screen_ctx *sc)
{
- return (sc->font->descent);
+ return (sc->xftfont->descent);
}
u_int
font_height(struct screen_ctx *sc)
{
- return (sc->font->height + 1);
+ return (sc->xftfont->height + 1);
}
void
@@ -59,8 +59,8 @@ font_init(struct screen_ctx *sc, const char *name, const char **color)
if (sc->xftdraw == NULL)
errx(1, "XftDrawCreate");
- sc->font = XftFontOpenName(X_Dpy, sc->which, name);
- if (sc->font == NULL)
+ sc->xftfont = XftFontOpenName(X_Dpy, sc->which, name);
+ if (sc->xftfont == NULL)
errx(1, "XftFontOpenName");
for (i = 0; i < CWM_COLOR_MENU_MAX; i++) {
@@ -88,7 +88,7 @@ font_width(struct screen_ctx *sc, const char *text, int len)
{
XGlyphInfo extents;
- XftTextExtentsUtf8(X_Dpy, sc->font, (const FcChar8*)text,
+ XftTextExtentsUtf8(X_Dpy, sc->xftfont, (const FcChar8*)text,
len, &extents);
return (extents.xOff);
@@ -102,6 +102,6 @@ font_draw(struct screen_ctx *sc, const char *text, int len,
color = active ? CWM_COLOR_MENU_FONT_SEL : CWM_COLOR_MENU_FONT;
XftDrawChange(sc->xftdraw, d);
- XftDrawStringUtf8(sc->xftdraw, &sc->xftcolor[color], sc->font, x, y,
+ XftDrawStringUtf8(sc->xftdraw, &sc->xftcolor[color], sc->xftfont, x, y,
(const FcChar8*)text, len);
}