aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsimonb <simonb>2007-08-05 03:11:05 (GMT)
committersimonb <simonb>2007-08-05 03:11:05 (GMT)
commit5fc277afaa7eaf974b31289a7bed695e3093ed20 (patch)
tree3c17a3fdefe3aa2dc3352060ee3eabd8a54e3d33 /src
parent178e0f599481f169f77ce18a296ecf19128927f1 (diff)
downloadfluxbox-5fc277afaa7eaf974b31289a7bed695e3093ed20.zip
fluxbox-5fc277afaa7eaf974b31289a7bed695e3093ed20.tar.bz2
port default change from trunk
Diffstat (limited to 'src')
-rw-r--r--src/Remember.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Remember.cc b/src/Remember.cc
index cfd0d61..fa9b2ee 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -318,15 +318,22 @@ Application * Remember::add(WinClient &winclient) {
318 ClientPattern *p = new ClientPattern(); 318 ClientPattern *p = new ClientPattern();
319 Application *app = new Application(false); 319 Application *app = new Application(false);
320 320
321 // by default, we match against the WMClass of a window. 321 // by default, we match against the WMClass of a window (instance and class strings)
322 string win_name = p->getProperty(ClientPattern::NAME, winclient);
322 string win_class = p->getProperty(ClientPattern::CLASS, winclient); 323 string win_class = p->getProperty(ClientPattern::CLASS, winclient);
323 324
324 // replace special chars like ( ) and [ ] with \( \) and \[ \] 325 // replace special chars like ( ) and [ ] with \( \) and \[ \]
326 win_name = FbTk::StringUtil::replaceString(win_name, "(", "\\(");
327 win_name = FbTk::StringUtil::replaceString(win_name, ")", "\\)");
328 win_name = FbTk::StringUtil::replaceString(win_name, "[", "\\[");
329 win_name = FbTk::StringUtil::replaceString(win_name, "]", "\\]");
330
325 win_class = FbTk::StringUtil::replaceString(win_class, "(", "\\("); 331 win_class = FbTk::StringUtil::replaceString(win_class, "(", "\\(");
326 win_class = FbTk::StringUtil::replaceString(win_class, ")", "\\)"); 332 win_class = FbTk::StringUtil::replaceString(win_class, ")", "\\)");
327 win_class = FbTk::StringUtil::replaceString(win_class, "[", "\\["); 333 win_class = FbTk::StringUtil::replaceString(win_class, "[", "\\[");
328 win_class = FbTk::StringUtil::replaceString(win_class, "]", "\\]"); 334 win_class = FbTk::StringUtil::replaceString(win_class, "]", "\\]");
329 335
336 p->addTerm(win_name, ClientPattern::NAME);
330 p->addTerm(win_class, ClientPattern::CLASS); 337 p->addTerm(win_class, ClientPattern::CLASS);
331 m_clients[&winclient] = app; 338 m_clients[&winclient] = app;
332 p->addMatch(); 339 p->addMatch();