chore: clippy fixes

This commit is contained in:
Hojjat 2026-09-04 07:46:03 -06:00 • committed by Victoria Brekenfeld
parent 057e7b72cc
commit 0f56d214b9
7 changed files with 66 additions and 72 deletions

View file

@ -69,17 +69,16 @@ impl State {
XdgMode::from_preference(self.default_decoration())
};
for (window, _) in mapped.windows() {
if PreferredDecorationMode::is_unset(&window.0) {
if let Some(toplevel) = window.0.toplevel() {
if toplevel.with_committed_state(|state| {
state.is_some_and(|state| state.decoration_mode.is_some())
}) {
toplevel.with_pending_state(|state| {
state.decoration_mode = Some(mode);
});
toplevel.send_configure();
}
}
if PreferredDecorationMode::is_unset(&window.0)
&& let Some(toplevel) = window.0.toplevel()
&& toplevel.with_committed_state(|state| {
state.is_some_and(|state| state.decoration_mode.is_some())
})
{
toplevel.with_pending_state(|state| {
state.decoration_mode = Some(mode);
});
toplevel.send_configure();
}
}
};

View file

@ -89,7 +89,6 @@ impl PointerConstraintsHandler for State {
ConstraintRemove::PointerLeave(_) => {
// If the constraint was broken by the pointer forcibly leaving the surface, then it doesn't
// make much sense to warp it.
return;
}
ConstraintRemove::Destroyed(constraint) => {
let Some(seat) = self