Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(macos): convert physical to logical pixels for drag handling

Louis Beaumont84b21f6c2976
diff --git a/screenpipe-app-tauri/app/shortcut-reminder/page.tsx b/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
index a46bba342..123dc8d17 100644
--- a/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
+++ b/screenpipe-app-tauri/app/shortcut-reminder/page.tsx
@@ -83,7 +83,9 @@ export default function ShortcutReminderPage() {
if (e.button !== 0) return;
try {
const pos = await getCurrentWindow().outerPosition();
- windowStart.current = { x: pos.x, y: pos.y };
+ const scaleFactor = await getCurrentWindow().scaleFactor();
+ // Convert physical pixels to logical pixels to match mouse event coordinates
+ windowStart.current = { x: pos.x / scaleFactor, y: pos.y / scaleFactor };
dragStart.current = { x: e.screenX, y: e.screenY };
isDragging.current = true;
document.addEventListener("mousemove", handleMouseMove);