all repos — openbox @ bced74beaa9ff03e0810ff1d61a3704040841942

openbox fork - make it a bit more like ryudo

Add matching which monitor the client is on in the If action (Bug 5426)
Mikael Magnusson mikachu@gmail.com
commit

bced74beaa9ff03e0810ff1d61a3704040841942

parent

f8aa8cf5bb901b6f056c6efabf0b48902a837a0d

1 files changed, 7 insertions(+), 1 deletions(-)

jump to
M openbox/actions/if.copenbox/actions/if.c

@@ -29,6 +29,7 @@ gboolean desktop_current;

gboolean desktop_other; guint desktop_number; guint screendesktop_number; + guint client_monitor; GPatternSpec *matchtitle; GRegex *regextitle; gchar *plaintitle;

@@ -106,6 +107,9 @@ o->plaintitle = g_strdup(s);

} g_free(s); } + } + if ((n = obt_xml_find_node(node, "monitor"))) { + o->client_monitor = obt_xml_node_int(n); } if ((n = obt_xml_find_node(node, "then"))) {

@@ -192,7 +196,9 @@ (g_pattern_match_string(o->matchtitle, c->original_title))) &&

(!o->regextitle || (g_regex_match(o->regextitle, c->original_title, 0, NULL))) && (!o->plaintitle || - (!strcmp(o->plaintitle, c->original_title)))) + (!strcmp(o->plaintitle, c->original_title))) && + (!o->client_monitor || + (o->client_monitor == client_monitor(c) + 1))) { acts = o->thenacts; }