fix Rule linked list handling in config

it seems that I was interrupted when I was coding new Rule handling in linked list
This commit is contained in:
Julien Danjou 2007-11-13 22:29:33 +01:00
parent 06dc3ba221
commit 2fb7b4d69a
1 changed files with 8 additions and 2 deletions

View File

@ -459,6 +459,14 @@ parse_config(const char *confpatharg, awesome_config *awesomeconf)
rule->screen = cfg_getint(cfgsectmp, "screen"); rule->screen = cfg_getint(cfgsectmp, "screen");
if(rule->screen >= get_screen_count(awesomeconf->display)) if(rule->screen >= get_screen_count(awesomeconf->display))
rule->screen = 0; rule->screen = 0;
if(j < cfg_size(cfg_rules, "rule") - 1)
{
rule->next = p_new(Rule, 1);
rule = rule->next;
}
else
rule->next = NULL;
} }
} }
else else
@ -667,8 +675,6 @@ uicb_reloadconfig(awesome_config *awesomeconf,
c->tags[0] = 1; c->tags[0] = 1;
saveprops(c, awesomeconf_first[c->screen].ntags); saveprops(c, awesomeconf_first[c->screen].ntags);
if (!loadprops(c, awesomeconf_first[c->screen].ntags))
applyrules(c, awesomeconf_first);
} }
/* Cleanup after ourselves */ /* Cleanup after ourselves */