From 9e60c45cdaa5812741860f81f3543fcee631a9aa Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 19 Sep 2003 07:30:07 +0000 Subject: [PATCH] dont allow 0 desktops --- openbox/config.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.45.2