Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

fix: pin cursor state to arrow when native monitor is unavailable

tokenflow1med9675b16160
diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.ts
index a434c77d..4228ab21 100644
--- a/electron/ipc/handlers.ts
+++ b/electron/ipc/handlers.ts
@@ -1104,7 +1104,7 @@ async function startNativeCursorMonitor() {
stopNativeCursorMonitor()
if (process.platform !== 'darwin' && process.platform !== 'win32') {
- currentCursorVisualType = undefined
+ currentCursorVisualType = 'arrow'
return
}
@@ -1117,7 +1117,7 @@ async function startNativeCursorMonitor() {
}
nativeCursorMonitorOutputBuffer = ''
- currentCursorVisualType = undefined
+ currentCursorVisualType = 'arrow'
nativeCursorMonitorProcess = spawn(helperPath, [], {
stdio: ['pipe', 'pipe', 'pipe'],
})
@@ -1127,18 +1127,18 @@ async function startNativeCursorMonitor() {
nativeCursorMonitorProcess.once('close', () => {
nativeCursorMonitorProcess = null
nativeCursorMonitorOutputBuffer = ''
- currentCursorVisualType = undefined
+ currentCursorVisualType = 'arrow'
})
} catch (error) {
console.warn('Failed to start native cursor monitor:', error)
nativeCursorMonitorProcess = null
nativeCursorMonitorOutputBuffer = ''
- currentCursorVisualType = undefined
+ currentCursorVisualType = 'arrow'
}
}
function stopNativeCursorMonitor() {
- currentCursorVisualType = undefined
+ currentCursorVisualType = 'arrow'
if (!nativeCursorMonitorProcess) {
return