all repos — openbox @ 8a975cb10051e8da0420275a43f1b49d3cce2678

openbox fork - make it a bit more like ryudo

respect the active/mouse options for monitor placement, and use ObMonitorPlace for per-app too
Dana Jansens danakj@orodu.net
commit

8a975cb10051e8da0420275a43f1b49d3cce2678

parent

4aade63604e9d29f01933b9bf0ac9228721411ef

3 files changed, 13 insertions(+), 16 deletions(-)

jump to
M openbox/config.copenbox/config.c

@@ -111,7 +111,7 @@ ObAppSettings *settings = g_slice_new0(ObAppSettings);

settings->type = -1; settings->decor = -1; settings->shade = -1; - settings->monitor_type = 0; + settings->monitor_type = OB_PLACE_MONITOR_ANY; settings->monitor = -1; settings->focus = -1; settings->desktop = 0;

@@ -136,7 +136,7 @@

copy_if(type, (ObClientType)-1); copy_if(decor, -1); copy_if(shade, -1); - copy_if(monitor_type, 0); + copy_if(monitor_type, OB_PLACE_MONITOR_ANY); copy_if(monitor, -1); copy_if(focus, -1); copy_if(desktop, 0);

@@ -297,13 +297,13 @@ if (!obt_xml_node_contains(c, "default")) {

gchar *s = obt_xml_node_string(c); if (!g_ascii_strcasecmp(s, "mouse")) settings->monitor_type = - OB_APP_SETTINGS_MONITOR_MOUSE; + OB_PLACE_MONITOR_MOUSE; else if (!g_ascii_strcasecmp(s, "active")) settings->monitor_type = - OB_APP_SETTINGS_MONITOR_ACTIVE; + OB_PLACE_MONITOR_ACTIVE; else if (!g_ascii_strcasecmp(s, "primary")) settings->monitor_type = - OB_APP_SETTINGS_MONITOR_PRIMARY; + OB_PLACE_MONITOR_PRIMARY; else settings->monitor = obt_xml_node_int(c); g_free(s);
M openbox/config.hopenbox/config.h

@@ -33,13 +33,6 @@ #include <glib.h>

typedef struct _ObAppSettings ObAppSettings; -typedef enum { - OB_APP_SETTINGS_MONITOR_FIXED, - OB_APP_SETTINGS_MONITOR_PRIMARY, - OB_APP_SETTINGS_MONITOR_ACTIVE, - OB_APP_SETTINGS_MONITOR_MOUSE -} ObAppSettingsMonitor; - struct _ObAppSettings { GPatternSpec *class;

@@ -56,7 +49,7 @@ guint desktop;

gint shade; gint decor; gint focus; - ObAppSettingsMonitor monitor_type; + ObPlaceMonitor monitor_type; gint monitor; gint iconic; gint skip_pager;
M openbox/place.copenbox/place.c

@@ -193,21 +193,25 @@ choice[i].flags |= HEAD_PRIMARY;

if (config_place_monitor == OB_PLACE_MONITOR_PRIMARY) choice[i].flags |= HEAD_PLACED; if (settings && - settings->monitor_type == OB_APP_SETTINGS_MONITOR_PRIMARY) + settings->monitor_type == OB_PLACE_MONITOR_PRIMARY) choice[i].flags |= HEAD_PERAPP; } i = screen_monitor_active(); if (i < screen_num_monitors) { + if (config_place_monitor == OB_PLACE_MONITOR_ACTIVE) + choice[i].flags |= HEAD_PLACED; if (settings && - settings->monitor_type == OB_APP_SETTINGS_MONITOR_ACTIVE) + settings->monitor_type == OB_PLACE_MONITOR_ACTIVE) choice[i].flags |= HEAD_PERAPP; } i = screen_monitor_pointer(); if (i < screen_num_monitors) { + if (config_place_monitor == OB_PLACE_MONITOR_MOUSE) + choice[i].flags |= HEAD_PLACED; if (settings && - settings->monitor_type == OB_APP_SETTINGS_MONITOR_MOUSE) + settings->monitor_type == OB_PLACE_MONITOR_MOUSE) choice[i].flags |= HEAD_PERAPP; }