From 95535e86237e6c89935eb7563f37f13474c466f2 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 14 Oct 2010 19:40:41 -0400 Subject: [PATCH] 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. --- data/rc.xml | 4 +- openbox/client.c | 117 ++++++------ openbox/config.c | 4 +- openbox/place.c | 476 ++++++++++++++++++++++++++--------------------- openbox/place.h | 7 +- 5 files changed, 333 insertions(+), 275 deletions(-) diff --git a/data/rc.xml b/data/rc.xml index 7faa2550..faa401bd 100644 --- a/data/rc.xml +++ b/data/rc.xml @@ -36,10 +36,10 @@
yes
- Active + Primary + the active window is, 'Primary' - only on the primary monitor --> 1