From: Mikael Magnusson Date: Mon, 23 Jul 2007 23:45:41 +0000 (+0200) Subject: Allow selecting the random placement strategy. The hunk for place.c that actually... X-Git-Tag: mikabox-3.4.4~9 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=7edce4d696685edb22a50aea64696c0e7537ecac;p=mikachu%2Fopenbox.git Allow selecting the random placement strategy. The hunk for place.c that actually does this seems to have been lost somewhere on the way. --- diff --git a/openbox/config.c b/openbox/config.c index d7418e68..ddc6be5c 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -498,9 +498,12 @@ static void parse_placement(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, node = node->children; - if ((n = parse_find_node("policy", node))) + if ((n = parse_find_node("policy", node))) { if (parse_contains("UnderMouse", doc, n)) config_place_policy = OB_PLACE_POLICY_MOUSE; + if (parse_contains("Random", doc, n)) + config_place_policy = OB_PLACE_POLICY_RANDOM; + } if ((n = parse_find_node("center", node))) config_place_center = parse_bool(doc, n); } diff --git a/openbox/place.h b/openbox/place.h index e2f1d4e4..abfbe4bc 100644 --- a/openbox/place.h +++ b/openbox/place.h @@ -28,6 +28,7 @@ struct _ObAppSettings; typedef enum { OB_PLACE_POLICY_SMART, + OB_PLACE_POLICY_RANDOM, OB_PLACE_POLICY_MOUSE } ObPlacePolicy;