From 719654fcbc8d6729a508ad2d94052827d2d69bef Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Fri, 26 Nov 2010 21:32:28 +0100 Subject: [PATCH] Ewmh: Add _WMFS_FONT property for external information about font --- src/ewmh.c | 1 + src/init.c | 4 ++++ src/structs.h | 1 + 3 files changed, 6 insertions(+) diff --git a/src/ewmh.c b/src/ewmh.c index 940484a..7fe04d8 100644 --- a/src/ewmh.c +++ b/src/ewmh.c @@ -105,6 +105,7 @@ ewmh_init_hints(void) net_atom[wmfs_nmaster] = ATOM("_WMFS_NMASTER"); net_atom[wmfs_function] = ATOM("_WMFS_FUNCTION"); net_atom[wmfs_cmd] = ATOM("_WMFS_CMD"); + net_atom[wmfs_font] = ATOM("_WMFS_FONT"); /* Multi atom _WMFS_STATUSTEXT_ */ for(j = 0; j < s; ++j) diff --git a/src/init.c b/src/init.c index 0528fc3..21b01e0 100644 --- a/src/init.c +++ b/src/init.c @@ -91,6 +91,10 @@ init_font(void) font = XftFontOpenName(dpy, SCREEN, "sans-10"); } + /* Set font in _WMFS_FONT for eventual status tools */ + XChangeProperty(dpy, ROOT, net_atom[wmfs_font], net_atom[utf8_string], 8, + PropModeReplace, (uchar*)&conf.font, strlen(conf.font)); + return; } diff --git a/src/structs.h b/src/structs.h index 19288a6..4f8692e 100644 --- a/src/structs.h +++ b/src/structs.h @@ -148,6 +148,7 @@ enum wmfs_screen_count, wmfs_function, wmfs_cmd, + wmfs_font, wmfs_statustext, net_last };