diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-06-08 18:29:47 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-06-08 18:29:47 (GMT) |
commit | a84fe20c49198c1ef74616e51152a5e1363fab41 (patch) | |
tree | 4fe2c2a2fa92d3452c6a8ccbba71641693a0cb38 /src/ClientPattern.cc | |
parent | 6509fe0cacf25f30fb6fce9df9569d14f00f0a8f (diff) | |
download | fluxbox-a84fe20c49198c1ef74616e51152a5e1363fab41.zip fluxbox-a84fe20c49198c1ef74616e51152a5e1363fab41.tar.bz2 |
add (urgent=yes|no) options to ClientPattern
Diffstat (limited to 'src/ClientPattern.cc')
-rw-r--r-- | src/ClientPattern.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc index d037bb4..c08a574 100644 --- a/src/ClientPattern.cc +++ b/src/ClientPattern.cc | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include "ClientPattern.hh" | 23 | #include "ClientPattern.hh" |
24 | 24 | ||
25 | #include "fluxbox.hh" | ||
25 | #include "FocusControl.hh" | 26 | #include "FocusControl.hh" |
26 | #include "Layer.hh" | 27 | #include "Layer.hh" |
27 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -132,6 +133,8 @@ ClientPattern::ClientPattern(const char *str, bool default_no_transient): | |||
132 | prop = HEAD; | 133 | prop = HEAD; |
133 | } else if (strcasecmp(memstr.c_str(), "layer") == 0) { | 134 | } else if (strcasecmp(memstr.c_str(), "layer") == 0) { |
134 | prop = LAYER; | 135 | prop = LAYER; |
136 | } else if (strcasecmp(memstr.c_str(), "urgent") == 0) { | ||
137 | prop = URGENT; | ||
135 | } else { | 138 | } else { |
136 | prop = NAME; | 139 | prop = NAME; |
137 | expr = match; | 140 | expr = match; |
@@ -244,6 +247,8 @@ string ClientPattern::toString() const { | |||
244 | case LAYER: | 247 | case LAYER: |
245 | pat.append("layer="); | 248 | pat.append("layer="); |
246 | break; | 249 | break; |
250 | case URGENT: | ||
251 | pat.append("urgent="); | ||
247 | } | 252 | } |
248 | 253 | ||
249 | pat.append((*it)->orig); | 254 | pat.append((*it)->orig); |
@@ -403,6 +408,10 @@ string ClientPattern::getProperty(WinProperty prop, const Focusable &client) { | |||
403 | case LAYER: | 408 | case LAYER: |
404 | return fbwin ? ::Layer::getString(fbwin->layerNum()) : ""; | 409 | return fbwin ? ::Layer::getString(fbwin->layerNum()) : ""; |
405 | break; | 410 | break; |
411 | case URGENT: | ||
412 | return Fluxbox::instance()->attentionHandler() | ||
413 | .isDemandingAttention(client) ? "yes" : "no"; | ||
414 | break; | ||
406 | } | 415 | } |
407 | return client.getWMClassName(); | 416 | return client.getWMClassName(); |
408 | } | 417 | } |