1
0
Fork 0
forked from wry/wry

config: add just-mapped window criteria

This commit is contained in:
Julian Orth 2025-05-01 18:52:55 +02:00
parent e36ccd560c
commit 5f1268cada
16 changed files with 95 additions and 4 deletions

View file

@ -116,6 +116,7 @@ pub enum WindowCriterionIpc {
Urgent,
SeatFocus(Seat),
Fullscreen,
JustMapped,
}
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq)]

View file

@ -1662,6 +1662,7 @@ impl ConfigClient {
WindowCriterion::Urgent => WindowCriterionIpc::Urgent,
WindowCriterion::Focus(seat) => WindowCriterionIpc::SeatFocus(seat),
WindowCriterion::Fullscreen => WindowCriterionIpc::Fullscreen,
WindowCriterion::JustMapped => WindowCriterionIpc::JustMapped,
};
let res = self.send_with_response(&ClientMessage::CreateWindowMatcher { criterion });
get_response!(

View file

@ -255,6 +255,11 @@ pub enum WindowCriterion<'a> {
Focus(Seat),
/// Matches if the window is fullscreen.
Fullscreen,
/// Matches if the window has/hasn't just been mapped.
///
/// This is true for one iteration of the compositor's main loop immediately after the
/// window has been mapped.
JustMapped,
}
impl WindowCriterion<'_> {