Fixed stale surface check unwrapping

Regression from 799027d1. Unwraps on a None value when doing the stale surface generation technique in Chatterino7 as described in #74, very consistent
This commit is contained in:
En-En 2025-06-22 21:33:47 +00:00 committed by Supreeeme
parent 03cbb2ee3a
commit da3b2838d2

View file

@ -464,8 +464,11 @@ impl Event for client::wl_pointer::Event {
warn!("could not enter surface: stale surface"); warn!("could not enter surface: stale surface");
return; return;
}; };
let Some((surface, role, scale, window)) = query.get() else {
warn!("could not enter surface: stale surface");
return;
};
let (surface, role, scale, window) = query.get().unwrap();
cmd.insert(target, (*scale,)); cmd.insert(target, (*scale,));
let surface_is_popup = matches!(role, SurfaceRole::Popup(_)); let surface_is_popup = matches!(role, SurfaceRole::Popup(_));