summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsimonb <simonb>2007-08-05 03:10:04 (GMT)
committersimonb <simonb>2007-08-05 03:10:04 (GMT)
commit2006d20d45eaa091c737067004ec7421a0cfc730 (patch)
tree84565cfd38a8390a183a196891f2bc5d5a64c58a /src
parentf46660f711a1e48879087cfda08de43c1ab401c0 (diff)
downloadfluxbox_lack-2006d20d45eaa091c737067004ec7421a0cfc730.zip
fluxbox_lack-2006d20d45eaa091c737067004ec7421a0cfc730.tar.bz2
remember on the class AND instance name by default
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 aec9921..31b416a 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(0); 319 Application *app = new Application(0);
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();