From dfef818e8f9eb3dc5d52eb16d3454183a39f504d Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 13 Feb 2008 18:26:08 +0100 Subject: [PATCH] do not die on unknown placement: take the first one --- config.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config.c b/config.c index 87869a008..dcfa01226 100644 --- a/config.c +++ b/config.c @@ -278,6 +278,7 @@ config_parse_screen(cfg_t *cfg, int screen) { char buf[2]; const char *tmp; + FloatingPlacement flpl; Layout *layout = NULL; Tag *tag = NULL; Statusbar *statusbar = NULL; @@ -321,6 +322,13 @@ config_parse_screen(cfg_t *cfg, int screen) virtscreen->floating_placement = name_func_lookup(cfg_getstr(cfg_general, "floating_placement"), 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) eprint("awesome: cannot init font\n");