aboutsummaryrefslogtreecommitdiff
path: root/src/ClientPattern.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientPattern.cc')
-rw-r--r--src/ClientPattern.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc
index 38d1602..d9469fa 100644
--- a/src/ClientPattern.cc
+++ b/src/ClientPattern.cc
@@ -257,3 +257,19 @@ std::string ClientPattern::getProperty(WinProperty prop, const WinClient &client
257 } 257 }
258 return client.getWMClassName(); 258 return client.getWMClassName();
259} 259}
260
261bool ClientPattern::equals(const ClientPattern &pat) const {
262 // we require the terms to be identical (order too)
263 Terms::const_iterator it = m_terms.begin();
264 Terms::const_iterator it_end = m_terms.end();
265 Terms::const_iterator other_it = pat.m_terms.begin();
266 Terms::const_iterator other_it_end = pat.m_terms.end();
267 for (; it != it_end, other_it != other_it_end; ++it, ++other_it) {
268 if ((*it)->orig != (*other_it)->orig)
269 return false;
270 }
271 if (it != it_end || other_it != other_it_end)
272 return false;
273
274 return true;
275}