Skip to content

Commit

Permalink
feat: use raw location
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueGlassBlock committed Aug 23, 2024
1 parent 614b8cb commit ddbaf8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toucca-lib/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn update_pointer(_: HWND, param: WPARAM) {
if GetPointerInfo(lo_word(param) as u32, &mut ptr_info).is_err() {
return;
}
ScreenToClient(ptr_info.hwndTarget, &mut ptr_info.ptPixelLocation);
ScreenToClient(ptr_info.hwndTarget, &mut ptr_info.ptPixelLocationRaw);
}
let mut guard = _ACTIVE_POINTERS.lock().unwrap();
if (ptr_info.pointerFlags & POINTER_FLAG_FIRSTBUTTON).0 == 0 {
Expand All @@ -78,7 +78,7 @@ fn update_pointer(_: HWND, param: WPARAM) {
map_guard.remove(&ptr_info.pointerId);
}
} else {
let POINT { x, y } = ptr_info.ptPixelLocation;
let POINT { x, y } = ptr_info.ptPixelLocationRaw;
guard.insert(ptr_info.pointerId, (x, y));
}
}
Expand Down

0 comments on commit ddbaf8b

Please sign in to comment.