From 7edce4d696685edb22a50aea64696c0e7537ecac Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Tue, 24 Jul 2007 01:45:41 +0200 Subject: [PATCH] Allow selecting the random placement strategy. The hunk for place.c that actually does this seems to have been lost somewhere on the way. --- openbox/config.c | 5 ++++- openbox/place.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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; -- 2.34.1