1j01 / tracky-mouse

Mouse control via head tracking, as a cross platform desktop app and JS library. eViacam alternative.
https://trackymouse.js.org/
MIT License
25 stars 4 forks source link

F9 shortcut fails if triggered after window is closed but app not quit on macOS #8

Closed 1j01 closed 2 months ago

1j01 commented 1 year ago

It gets an error in the main process because the window is destroyed. It should either unregister the shortcut when closing the app window, or the global shortcut handler should handle reopening the window when needed.

Uncaught Exception:
TypeError: Object has been destroyed
    at Function.<anonymous> (/Users/io/Projects/tracky-mouse/tracky-mouse-electron/src/electron-main.js:186:14)

image

1j01 commented 2 months ago

I'm also getting this on Windows, when closing the main window and then pressing F9. I think the screen overlay window isn't closing and so the app is staying running?

[Window Title]
Error

[Main Instruction]
A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
TypeError: Object has been destroyed
    at Function.<anonymous> (C:\Users\Isaiah\Projects\tracky-mouse\tracky-mouse-electron\src\electron-main.js:211:14)

[OK]