1
0
Fork 0
forked from wry/wry

config: add client window criteria

This commit is contained in:
Julian Orth 2025-05-02 23:46:11 +02:00
parent 59f8acdfde
commit 2b5be7fbd9
19 changed files with 205 additions and 14 deletions

View file

@ -219,7 +219,7 @@ impl Rule for WindowRule {
}
fn map_custom(
_state: &Rc<State>,
state: &Rc<State>,
all: &mut Vec<MatcherTemp<Self>>,
match_: &Self::Match,
) -> Option<()> {
@ -248,6 +248,14 @@ impl Rule for WindowRule {
if let Some(value) = &match_.types {
all.push(m(WindowCriterion::Types(*value)));
}
if let Some(value) = &match_.client {
let mut mapper = state.persistent.client_rule_mapper.borrow_mut();
let mapper = mapper.as_mut()?;
let matcher = mapper.map_temporary_match(&[], value)?;
all.push(m(WindowCriterion::Client(&ClientCriterion::Matcher(
matcher.0,
))));
}
Some(())
}