fix: ensure app gains focus when restoring main window (#6984)

Add app.focus({ steal: true }) before restoring the window to ensure
the application properly gains focus when activated.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
lohit
2026-01-30 10:22:30 +00:00
committed by GitHub
parent 3996b86bcb
commit 214e1434e5

View File

@@ -93,6 +93,7 @@ let appProtocolUrl;
// Helper function to focus and restore the main window
const focusMainWindow = () => {
if (mainWindow) {
app.focus({ steal: true });
if (mainWindow.isMinimized()) {
mainWindow.restore();
}