case-insensitive extensions and explicit else arms
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user