do not die on unknown placement: take the first one

This commit is contained in:
Julien Danjou 2008-02-13 18:26:08 +01:00
parent 313b436be7
commit dfef818e8f
1 changed files with 8 additions and 0 deletions

View File

@ -278,6 +278,7 @@ config_parse_screen(cfg_t *cfg, int screen)
{ {
char buf[2]; char buf[2];
const char *tmp; const char *tmp;
FloatingPlacement flpl;
Layout *layout = NULL; Layout *layout = NULL;
Tag *tag = NULL; Tag *tag = NULL;
Statusbar *statusbar = NULL; Statusbar *statusbar = NULL;
@ -321,6 +322,13 @@ config_parse_screen(cfg_t *cfg, int screen)
virtscreen->floating_placement = virtscreen->floating_placement =
name_func_lookup(cfg_getstr(cfg_general, "floating_placement"), name_func_lookup(cfg_getstr(cfg_general, "floating_placement"),
FloatingPlacementList); FloatingPlacementList);
if(!virtscreen->floating_placement)
{
warn("unknown floating placement: %s\n", cfg_getstr(cfg_general, "floating_placement"));
virtscreen->floating_placement = FloatingPlacementList[0].func;
}
if(!virtscreen->font) if(!virtscreen->font)
eprint("awesome: cannot init font\n"); eprint("awesome: cannot init font\n");