From 569e8d4e8c968e4cb1323ad331ec7affcbbb8790 Mon Sep 17 00:00:00 2001 From: shashank-sn Date: Mon, 29 Jun 2026 07:26:08 +0530 Subject: [PATCH 1/2] fix: prevent main window auto-show and webcam activation after screenshot editor close Add AUTO_SHOW_WINDOW: false to the /screenshot-editor route, matching the existing /editor route pattern. This prevents the router from auto-showing the main window (and its camera preview) when the screenshot editor is closed. Fixes #1863 Co-authored-by: CommandCodeBot --- apps/desktop/src/app.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/app.tsx b/apps/desktop/src/app.tsx index e7cfcc0c4d..022501fa3d 100644 --- a/apps/desktop/src/app.tsx +++ b/apps/desktop/src/app.tsx @@ -234,7 +234,11 @@ function Inner() { - + Date: Mon, 29 Jun 2026 07:26:17 +0530 Subject: [PATCH 2/2] fix: prevent area picker from immediately releasing click-drag on some platforms The trackPointerSession blur handler was checking pointer capture synchronously, but setPointerCapture may not have finalized by the time the blur event fires (a microtask race in Tauri/WebKit). This causes the drag session to be immediately cancelled, breaking area selection for both screenshots and recording area picker. Defer the capture check by queueMicrotask so pointer capture has time to establish before we decide the session is orphaned. Fixes #1915 Co-authored-by: CommandCodeBot --- apps/desktop/src/components/Cropper.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/components/Cropper.tsx b/apps/desktop/src/components/Cropper.tsx index 55e94eb846..0dd42288fb 100644 --- a/apps/desktop/src/components/Cropper.tsx +++ b/apps/desktop/src/components/Cropper.tsx @@ -716,8 +716,12 @@ export function Cropper( // While pointer capture is held the drag is still ours even if the window // loses focus (e.g. another overlay or the camera window grabs it on // Windows). Real pointer loss arrives via pointercancel/lostpointercapture. + // Defer the capture check by one microtask so setPointerCapture has time + // to finalize before we decide the session is orphaned. blur: () => { - if (!target.hasPointerCapture?.(pointerId)) finish(); + queueMicrotask(() => { + if (!target.hasPointerCapture?.(pointerId)) finish(); + }); }, }); createEventListenerMap(target, {