diff options
| author | Mikael Magnusson <mikachu@gmail.com> | 2013-08-11 15:47:31 +0200 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2013-08-11 13:41:38 -0400 |
| commit | bced74beaa9ff03e0810ff1d61a3704040841942 (patch) | |
| tree | 541566cfc71a22197e177f58880db39b6388d915 /openbox | |
| parent | f8aa8cf5bb901b6f056c6efabf0b48902a837a0d (diff) | |
Add matching which monitor the client is on in the If action (Bug 5426)
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/actions/if.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openbox/actions/if.c b/openbox/actions/if.c index 7087d6a4..fd1280d2 100644 --- a/openbox/actions/if.c +++ b/openbox/actions/if.c @@ -29,6 +29,7 @@ typedef struct { gboolean desktop_other; guint desktop_number; guint screendesktop_number; + guint client_monitor; GPatternSpec *matchtitle; GRegex *regextitle; gchar *plaintitle; @@ -107,6 +108,9 @@ static gpointer setup_func(xmlNodePtr node) 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"))) { xmlNodePtr m; @@ -192,7 +196,9 @@ static gboolean run_func(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; } |
