summaryrefslogtreecommitdiff
path: root/openbox/config.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-10-14 19:40:41 -0400
committerDana Jansens <danakj@orodu.net>2011-01-24 14:19:22 -0500
commit95535e86237e6c89935eb7563f37f13474c466f2 (patch)
tree0c319165f6706e330ad8a23d407aa57410fe8c96 /openbox/config.c
parent76ae19924d79326892f0b851db740d7207e4e158 (diff)
Big changes to placement across multiple monitors.
Add a Primary option for which monitor to place new windows on. Make "Active" the default instead of "Any", which is just totally crazy. When a window is being placed in the FOREGROUND, use a monitor chosen in the following order: 1. same monitor as parent 2. primary monitor if placement=PRIMARY active monitor if placement=ACTIVE pointer monitor if placement=MOUSE 3. primary monitor 4. other monitors where the window has group members on the same desktop 5. other monitors where the window has group members on other desktops 6. other monitors When a window is being placed in the BACKGROUND, use a monitor chosen in the following order: 1. same monitor as parent 2. other monitors where the window has group members on the same desktop 2a. primary monitor in this set 2b. other monitors in this set 3. other monitors where the window has group members on other desktops 3a. primary monitor in this set 3b. other monitors in this set 4. other monitors 4a. primary monitor in this set 4b. other monitors in this set Decide to focus the new window before placing it, so we know if it will be placed in the foreground or background. Always choose a single monitor, then place on it, rather than possibly moving to a "backup" monitor. Unpredictable monitor placement is horrible.
Diffstat (limited to 'openbox/config.c')
-rw-r--r--openbox/config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbox/config.c b/openbox/config.c
index 3cd0b6ce..debd9fba 100644
--- a/openbox/config.c
+++ b/openbox/config.c
@@ -582,6 +582,8 @@ static void parse_placement(xmlNodePtr node, gpointer d)
config_place_monitor = OB_PLACE_MONITOR_ACTIVE;
else if (obt_xml_node_contains(n, "mouse"))
config_place_monitor = OB_PLACE_MONITOR_MOUSE;
+ else if (obt_xml_node_contains(n, "any"))
+ config_place_monitor = OB_PLACE_MONITOR_ANY;
}
if ((n = obt_xml_find_node(node, "primaryMonitor"))) {
config_primary_monitor_index = obt_xml_node_int(n);
@@ -1003,7 +1005,7 @@ void config_startup(ObtXmlInst *i)
config_place_policy = OB_PLACE_POLICY_SMART;
config_place_center = TRUE;
- config_place_monitor = OB_PLACE_MONITOR_ANY;
+ config_place_monitor = OB_PLACE_MONITOR_PRIMARY;
config_primary_monitor_index = 1;
config_primary_monitor = OB_PLACE_MONITOR_ACTIVE;