From: Mikael Magnusson Date: Sun, 11 Aug 2013 13:47:31 +0000 (+0200) Subject: clientmon X-Git-Tag: mikabox-3.5-7~18 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=3e5f00cab5ceac9f8d03065b43b296ee16de5326;p=mikachu%2Fopenbox.git clientmon --- diff --git a/openbox/actions/if.c b/openbox/actions/if.c index 6aa368a6..ffeb2c52 100644 --- a/openbox/actions/if.c +++ b/openbox/actions/if.c @@ -31,6 +31,7 @@ typedef struct { gboolean desktop_other; guint desktop_number; guint screendesktop_number; + guint client_monitor; GPatternSpec *matchtitle; GRegex *regextitle; gchar *plaintitle; @@ -120,6 +121,12 @@ static gpointer setup_func(xmlNodePtr node) g_free(s); } } + if ((n = obt_xml_find_node(node, "monitor"))) { + gchar *s; + if ((s = obt_xml_node_string(n))) { + o->client_monitor = atoi(s); + } + } if ((n = obt_xml_find_node(node, "then"))) { xmlNodePtr m; @@ -207,7 +214,9 @@ static gboolean run_func_if(ObActionsData *data, gpointer options) (!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; }