aboutsummaryrefslogtreecommitdiff
path: root/src/ClientPattern.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2009-06-28 20:10:58 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2009-06-28 20:10:58 (GMT)
commit589125672b684f18fbfb81dddb3a3fe45c857516 (patch)
treeb58b68e89b0987bbe37b8d411533afdfdd39847b /src/ClientPattern.cc
parentbb05494751e978b3e5edd1a54f7402a898762b9f (diff)
downloadfluxbox-589125672b684f18fbfb81dddb3a3fe45c857516.zip
fluxbox-589125672b684f18fbfb81dddb3a3fe45c857516.tar.bz2
allow matching screen number in ClientPattern
Diffstat (limited to 'src/ClientPattern.cc')
-rw-r--r--src/ClientPattern.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc
index 72bf161..84f421a 100644
--- a/src/ClientPattern.cc
+++ b/src/ClientPattern.cc
@@ -134,6 +134,8 @@ ClientPattern::ClientPattern(const char *str):
134 prop = LAYER; 134 prop = LAYER;
135 } else if (strcasecmp(memstr.c_str(), "urgent") == 0) { 135 } else if (strcasecmp(memstr.c_str(), "urgent") == 0) {
136 prop = URGENT; 136 prop = URGENT;
137 } else if (strcasecmp(memstr.c_str(), "screen") == 0) {
138 prop = SCREEN;
137 } else { 139 } else {
138 prop = NAME; 140 prop = NAME;
139 expr = match; 141 expr = match;
@@ -245,6 +247,10 @@ string ClientPattern::toString() const {
245 break; 247 break;
246 case URGENT: 248 case URGENT:
247 pat.append("urgent="); 249 pat.append("urgent=");
250 break;
251 case SCREEN:
252 pat.append("screen=");
253 break;
248 } 254 }
249 255
250 pat.append((*it)->orig); 256 pat.append((*it)->orig);
@@ -407,6 +413,13 @@ string ClientPattern::getProperty(WinProperty prop, const Focusable &client) {
407 return Fluxbox::instance()->attentionHandler() 413 return Fluxbox::instance()->attentionHandler()
408 .isDemandingAttention(client) ? "yes" : "no"; 414 .isDemandingAttention(client) ? "yes" : "no";
409 break; 415 break;
416 case SCREEN: {
417 int screenId = client.screen().screenNumber();
418 char tmpstr[32];
419 sprintf(tmpstr, "%d", screenId);
420 return std::string(tmpstr);
421 break;
422 }
410 } 423 }
411 return client.getWMClassName(); 424 return client.getWMClassName();
412} 425}