Update main.js

This commit is contained in:
Anirudh Sevugan 2025-02-27 23:28:21 +05:30 committed by GitHub
parent 96e183e8b2
commit bb2b25a889
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -188,6 +188,12 @@ app.whenReady().then(() => {
setupMenu(); setupMenu();
setupShortcuts(); setupShortcuts();
if (!mainWindow) {
createWindow(() => {
console.log("Created window");
});
}
mainWindow.on("focus", () => { mainWindow.on("focus", () => {
setupShortcuts(); // setupShortcuts() is an existing function made earlier in the code setupShortcuts(); // setupShortcuts() is an existing function made earlier in the code
}); });