case-insensitive extensions and explicit else arms

This commit is contained in:
2026-09-21 01:30:12 +03:00
parent 9e23a5b7d3
commit c7a4721e7d
4 changed files with 51 additions and 30 deletions
+4 -3
View File
@@ -137,9 +137,8 @@ unsafe extern "system" fn enum_at_point(hwnd: HWND, lparam: LPARAM) -> BOOL {
return BOOL(1);
}
// SAFETY: `hwnd` is the live handle described above.
let rect = match unsafe { visible_window_rect(hwnd) } {
Some(r) => r,
None => return BOOL(1),
let Some(rect) = (unsafe { visible_window_rect(hwnd) }) else {
return BOOL(1);
};
if ctx.point.x < rect.left
|| ctx.point.x >= rect.right
@@ -223,6 +222,8 @@ pub(crate) fn start(app: AppHandle, exclude_hwnds: Vec<isize>) -> PickerSession
} else if last_hwnd != 0 {
tracing::info!("picker hover: no target found at ({}, {})", pt.x, pt.y);
last_hwnd = 0;
} else {
// Still hovering the same window, so the frame is already drawn.
}
let pressed =