aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/ClientPattern.cc7
-rw-r--r--src/Remember.cc11
3 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e2ca91..93e13ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/01/02:
4 * Don't escape regular expression metacharacters in apps file, bug
5 #1595497 (Mark)
6 Remember.cc ClientPattern.cc
3*07/01/01: 7*07/01/01:
4 * Happy New Year! 8 * Happy New Year!
5 * Don't draw style's menu icon pixmap underneath the program's icon (Mark) 9 * Don't draw style's menu icon pixmap underneath the program's icon (Mark)
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc
index d2c809c..339092d 100644
--- a/src/ClientPattern.cc
+++ b/src/ClientPattern.cc
@@ -170,11 +170,6 @@ string ClientPattern::toString() const {
170 for (; it != it_end; ++it) { 170 for (; it != it_end; ++it) {
171 171
172 pat.append(" ("); 172 pat.append(" (");
173 // replace special chars like ( ) and [ ] with \( \) and \[ \]
174 string orig = FbTk::StringUtil::replaceString((*it)->orig, "(", "\\(");
175 orig = FbTk::StringUtil::replaceString(orig, ")", "\\)");
176 orig = FbTk::StringUtil::replaceString(orig, "[", "\\[");
177 orig = FbTk::StringUtil::replaceString(orig, "]", "\\]");
178 173
179 switch ((*it)->prop) { 174 switch ((*it)->prop) {
180 case NAME: 175 case NAME:
@@ -190,7 +185,7 @@ string ClientPattern::toString() const {
190 pat.append("role="); 185 pat.append("role=");
191 } 186 }
192 187
193 pat.append(orig); 188 pat.append((*it)->orig);
194 pat.append(")"); 189 pat.append(")");
195 } 190 }
196 191
diff --git a/src/Remember.cc b/src/Remember.cc
index 6f41528..d39cd3e 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -302,8 +302,17 @@ Application* Remember::find(WinClient &winclient) {
302Application * Remember::add(WinClient &winclient) { 302Application * Remember::add(WinClient &winclient) {
303 ClientPattern *p = new ClientPattern(); 303 ClientPattern *p = new ClientPattern();
304 Application *app = new Application(false); 304 Application *app = new Application(false);
305
305 // by default, we match against the WMClass of a window. 306 // by default, we match against the WMClass of a window.
306 p->addTerm(p->getProperty(ClientPattern::NAME, winclient), ClientPattern::NAME); 307 string win_name = p->getProperty(ClientPattern::NAME, winclient);
308
309 // replace special chars like ( ) and [ ] with \( \) and \[ \]
310 win_name = FbTk::StringUtil::replaceString(win_name, "(", "\\(");
311 win_name = FbTk::StringUtil::replaceString(win_name, ")", "\\)");
312 win_name = FbTk::StringUtil::replaceString(win_name, "[", "\\[");
313 win_name = FbTk::StringUtil::replaceString(win_name, "]", "\\]");
314
315 p->addTerm(win_name, ClientPattern::NAME);
307 m_clients[&winclient] = app; 316 m_clients[&winclient] = app;
308 p->addMatch(); 317 p->addMatch();
309 m_pats->push_back(make_pair(p, app)); 318 m_pats->push_back(make_pair(p, app));