Skip to content

Commit 0dc6f11

Browse files
committed
fix window re-activation issue
1 parent fd46e0c commit 0dc6f11

File tree

1 file changed

+4
-2
lines changed
  • frontend/src/targets/electron

1 file changed

+4
-2
lines changed

frontend/src/targets/electron/main.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const { appUpdateService } = ServiceRegistry.getInstance();
1717
const sentryService = new SentryMainService();
1818
sentryService.init();
1919

20+
ipcMain.handle("showDirectoryPicker", showDirectoryPicker);
21+
2022
async function createWindow() {
2123
win = new BrowserWindow({
2224
width: minWidth,
@@ -29,8 +31,6 @@ async function createWindow() {
2931
},
3032
});
3133

32-
ipcMain.handle("showDirectoryPicker", showDirectoryPicker);
33-
3434
// Open urls in the user's browser
3535
win.webContents.setWindowOpenHandler((data) => {
3636
shell.openExternal(data.url);
@@ -48,6 +48,7 @@ async function createWindow() {
4848

4949
app.on("ready", () => {
5050
setupMenu(win);
51+
console.log("ready");
5152
createWindow();
5253
appUpdateService.checkForUpdatesAndNotify({
5354
silent: true,
@@ -65,6 +66,7 @@ app.on("window-all-closed", function () {
6566
});
6667

6768
app.on("activate", function () {
69+
console.log("activate", BrowserWindow.getAllWindows());
6870
// On OS X it's core to re-create a window in the app when the
6971
// dock icon is clicked and there are no other windows open.
7072
if (BrowserWindow.getAllWindows().length === 0) createWindow();

0 commit comments

Comments
 (0)