From 5eebf703419aeb01a8508248df068dd31dec0bcb 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 109b2150..fa1a2aaf 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -502,9 +502,12 @@ static void parse_placement(xmlNodePtr node, gpointer d) node = node->children; - if ((n = obt_parse_find_node(node, "policy"))) + if ((n = obt_parse_find_node(node, "policy"))) { if (obt_parse_node_contains(n, "UnderMouse")) config_place_policy = OB_PLACE_POLICY_MOUSE; + if (obt_parse_node_contains(n, "Random")) + config_place_policy = OB_PLACE_POLICY_RANDOM; + } if ((n = obt_parse_find_node(node, "center"))) config_place_center = obt_parse_node_bool(n); if ((n = obt_parse_find_node(node, "monitor"))) { diff --git a/openbox/place.h b/openbox/place.h index 6a9add40..deb7bbfa 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