Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
account for monitor position when repositioning camera window
Brendan Allan9f53701a08f3
diff --git a/apps/desktop/src/routes/camera.tsx b/apps/desktop/src/routes/camera.tsxindex cfbfbe34d..26dade3d4 100644--- a/apps/desktop/src/routes/camera.tsx+++ b/apps/desktop/src/routes/camera.tsx@@ -110,7 +110,12 @@ export default function () {const currentWindow = getCurrentWindow();currentWindow.setSize(new LogicalSize(windowSize, windowHeight));- currentWindow.setPosition(new LogicalPosition(width, height));+ currentWindow.setPosition(+ new LogicalPosition(+ width + monitor.position.toLogical(scalingFactor).x,+ height + monitor.position.toLogical(scalingFactor).y+ )+ );return { width, height, size: windowSize };}@@ -192,7 +197,7 @@ export default function () {const aspectRatio =latestFrame().width / latestFrame().height;- const windowWidth = windowSize()?.size ?? 0;+ const windowWidth = windowSize.latest?.size ?? 0;const size = (() => {if (aspectRatio > 1)