bool Rules::match(const Client* c) const { if (!matchType(c->windowType(true))) return false; if (!matchWMClass(c->resourceClass(), c->resourceName())) return false; if (!matchRole(c->windowRole())) return false; if (!matchTitle(c->caption(false))) return false; if (!matchClientMachine(c->clientMachine()->hostName(), c->clientMachine()->isLocal())) return false; return true; }
bool Rules::match(const Client* c) const { if (!matchType(c->windowType(true))) return false; if (!matchWMClass(c->resourceClass(), c->resourceName())) return false; if (!matchRole(c->windowRole().toLower())) return false; if (!matchClientMachine(c->clientMachine()->hostName(), c->clientMachine()->isLocal())) return false; if (titlematch != UnimportantMatch) // track title changes to rematch rules QObject::connect(c, &Client::captionChanged, c, &Client::evaluateWindowRules, // QueuedConnection, because title may change before // the client is ready (could segfault!) static_cast<Qt::ConnectionType>(Qt::QueuedConnection|Qt::UniqueConnection)); if (!matchTitle(c->caption(false))) return false; return true; }