chore: clippy

This commit is contained in:
Vukašin Vojinović 2025-10-16 13:50:32 +02:00 committed by Victoria Brekenfeld
parent 3b70bc0265
commit 0847247c33
77 changed files with 865 additions and 1029 deletions

View file

@ -99,7 +99,7 @@ impl XdgShellHandler for State {
});
if let Some(root) = maybe_root {
let target = root.into();
let target = root;
let ret = self.common.popups.grab_popup(target, kind, &seat, serial);
match ret {
Ok(mut grab) => {
@ -304,12 +304,10 @@ impl XdgShellHandler for State {
if should_focus {
Shell::set_focus(self, Some(&target), &seat, None, true);
}
} else {
if let Some(pending) = shell.pending_windows.iter_mut().find(|pending| {
pending.surface.wl_surface().as_deref() == Some(surface.wl_surface())
}) {
pending.fullscreen.take();
}
} else if let Some(pending) = shell.pending_windows.iter_mut().find(|pending| {
pending.surface.wl_surface().as_deref() == Some(surface.wl_surface())
}) {
pending.fullscreen.take();
}
}
@ -337,12 +335,12 @@ impl XdgShellHandler for State {
{
let dh = self.common.display_handle.clone();
for client in clients.values() {
client_compositor_state(&client).blocker_cleared(self, &dh);
client_compositor_state(client).blocker_cleared(self, &dh);
}
}
if let Some(output) = output.as_ref() {
self.backend.schedule_render(&output);
self.backend.schedule_render(output);
}
}

View file

@ -22,7 +22,7 @@ use tracing::warn;
impl Shell {
pub fn unconstrain_popup(&self, surface: &PopupSurface) {
if let Some(parent) = get_popup_toplevel(&surface) {
if let Some(parent) = get_popup_toplevel(surface) {
if let Some(elem) = self.element_for_surface(&parent) {
let (mut element_geo, output, is_tiled) =
if let Some(workspace) = self.space_for(elem) {
@ -87,14 +87,14 @@ pub fn update_reactive_popups<'a>(
for (popup, _) in PopupManager::popups_for_surface(toplevel.wl_surface()) {
match popup {
PopupKind::Xdg(surface) => {
let positioner = with_states(&surface.wl_surface(), |states| {
let positioner = with_states(surface.wl_surface(), |states| {
let attributes = states
.data_map
.get::<XdgPopupSurfaceData>()
.unwrap()
.lock()
.unwrap();
attributes.current.positioner.clone()
attributes.current.positioner
});
if positioner.reactive {
let anchor_point = loc + positioner.get_anchor_point().as_global();