X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fconfig.c;h=e2ca29f7da4b1d682a59846bb8c67f456f6fc34f;hb=038735d627322c33b747ea75846e9bdcb2391767;hp=24da306013c39975151be6b13f4ac6f656d08492;hpb=2c6c0757fa497f4c1e0648bcbb1927c0fa12862f;p=chaz%2Fopenbox diff --git a/openbox/config.c b/openbox/config.c index 24da3060..e2ca29f7 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -4,11 +4,13 @@ #include "prop.h" #include "translate.h" #include "parser/parse.h" +#include "openbox.h" gboolean config_focus_new; gboolean config_focus_follow; gboolean config_focus_last; gboolean config_focus_last_on_desktop; +guint config_focus_delay; char *config_theme; @@ -39,16 +41,6 @@ GSList *config_menu_files; gint config_resist_win; gint config_resist_edge; -gchar *expand_tilde(const gchar *f) -{ - if (!f) - return NULL; - else if (f[0] != '~') - return g_strdup(f); - else - return g_strconcat(g_get_home_dir(), f+1, NULL); -} - /* @@ -214,6 +206,8 @@ static void parse_focus(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, config_focus_last = parse_bool(doc, n); if ((n = parse_find_node("focusLastOnDesktop", node))) config_focus_last_on_desktop = parse_bool(doc, n); + if ((n = parse_find_node("focusDelay", node))) + config_focus_delay = parse_int(doc, n); } static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, @@ -223,12 +217,12 @@ static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, node = node->xmlChildrenNode; - if ((n = parse_find_node("theme", node))) { + if ((n = parse_find_node("name", node))) { gchar *c; g_free(config_theme); c = parse_string(doc, n); - config_theme = expand_tilde(c); + config_theme = ob_expand_tilde(c); g_free(c); } if ((n = parse_find_node("titleLayout", node))) { @@ -343,7 +337,7 @@ static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d) c = parse_string(doc, node); config_menu_files = g_slist_append(config_menu_files, - expand_tilde(c)); + ob_expand_tilde(c)); g_free(c); } } @@ -367,6 +361,7 @@ void config_startup(ObParseInst *i) config_focus_follow = FALSE; config_focus_last = TRUE; config_focus_last_on_desktop = TRUE; + config_focus_delay = 150000; parse_register(i, "focus", parse_focus, NULL); @@ -407,7 +402,7 @@ void config_startup(ObParseInst *i) parse_register(i, "mouse", parse_mouse, NULL); config_resist_win = 10; - config_resist_edge = 10; + config_resist_edge = 20; parse_register(i, "resistance", parse_resistance, NULL);