From: Dana Jansens Date: Fri, 19 Sep 2003 07:30:07 +0000 (+0000) Subject: dont allow 0 desktops X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=9e60c45cdaa5812741860f81f3543fcee631a9aa;p=chaz%2Fopenbox dont allow 0 desktops --- diff --git a/openbox/config.c b/openbox/config.c index 73754f0b..c58033bb 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -227,8 +227,11 @@ static void parse_desktops(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, node = node->children; - if ((n = parse_find_node("number", node))) - config_desktops_num = parse_int(doc, n); + if ((n = parse_find_node("number", node))) { + guint d = parse_int(doc, n); + if (d > 0) + config_desktops_num = d; + } if ((n = parse_find_node("names", node))) { GSList *it; xmlNodePtr nname;