From b7393636e05c95ec068e8a1ff063cbefa63a901b Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 21 Dec 2009 10:42:58 -0500 Subject: make a config option for the inactive osd font --- openbox/config.c | 12 +++++++++--- openbox/config.h | 6 ++++-- openbox/openbox.c | 3 ++- 3 files changed, 15 insertions(+), 6 deletions(-) (limited to 'openbox') diff --git a/openbox/config.c b/openbox/config.c index 33fadeb7..6bdae9ff 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -57,7 +57,8 @@ RrFont *config_font_activewindow; RrFont *config_font_inactivewindow; RrFont *config_font_menuitem; RrFont *config_font_menutitle; -RrFont *config_font_osd; +RrFont *config_font_activeosd; +RrFont *config_font_inactiveosd; guint config_desktops_num; GSList *config_desktops_names; @@ -605,8 +606,12 @@ static void parse_theme(xmlNodePtr node, gpointer d) font = &config_font_menutitle; else if (obt_parse_attr_contains(n, "place", "MenuItem")) font = &config_font_menuitem; + else if (obt_parse_attr_contains(n, "place", "ActiveOnScreenDisplay")) + font = &config_font_activeosd; else if (obt_parse_attr_contains(n, "place", "OnScreenDisplay")) - font = &config_font_osd; + font = &config_font_activeosd; + else if (obt_parse_attr_contains(n, "place","InactiveOnScreenDisplay")) + font = &config_font_inactiveosd; else goto next_font; @@ -1036,7 +1041,8 @@ void config_shutdown(void) RrFontClose(config_font_inactivewindow); RrFontClose(config_font_menuitem); RrFontClose(config_font_menutitle); - RrFontClose(config_font_osd); + RrFontClose(config_font_activeosd); + RrFontClose(config_font_inactiveosd); for (it = config_desktops_names; it; it = g_slist_next(it)) g_free(it->data); diff --git a/openbox/config.h b/openbox/config.h index 18c97ede..11796dcb 100644 --- a/openbox/config.h +++ b/openbox/config.h @@ -152,8 +152,10 @@ extern RrFont *config_font_inactivewindow; extern RrFont *config_font_menutitle; /*! The font for menu items */ extern RrFont *config_font_menuitem; -/*! The font for on-screen-displays/popups */ -extern RrFont *config_font_osd; +/*! The font for on-screen-displays/popups' active text */ +extern RrFont *config_font_activeosd; +/*! The font for on-screen-displays/popups' inactive text */ +extern RrFont *config_font_inactiveosd; /*! The number of desktops */ extern guint config_desktops_num; diff --git a/openbox/openbox.c b/openbox/openbox.c index 800e6a21..5f926bb6 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -274,7 +274,8 @@ gint main(gint argc, gchar **argv) config_font_inactivewindow, config_font_menutitle, config_font_menuitem, - config_font_osd))) + config_font_activeosd, + config_font_inactiveosd))) { RrThemeFree(ob_rr_theme); ob_rr_theme = theme; -- cgit v1.2.3