Skip to content

Commit

Permalink
fixes #510
Browse files Browse the repository at this point in the history
  • Loading branch information
aza547 committed Aug 4, 2024
1 parent b4c7193 commit d4cc665
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
### Fixed
- The cloud account name field is now labelled user / email.
- [Issue 510](https://github.com/aza547/wow-recorder/issues/510) - Refocus the main window if the users tries to launch the app again.

## [5.7.1] - 2024-08-04
### Fixed
Expand Down
14 changes: 14 additions & 0 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,20 @@ app
return;
}

app.on('second-instance', () => {
console.info('[Main] Second instance attempted');

// Someone tried to run a second instance, we should focus this app.
if (mainWindow) {
if (mainWindow.isMinimized()) {
mainWindow.restore();
}

mainWindow.show();
mainWindow.focus();
}
});

createWindow();
})
.catch(console.error);

0 comments on commit d4cc665

Please sign in to comment.