Merge pull request #1830 from sbenmoussati/bugfix/SDA-4140-main

SDA-4140 Focus SDA after browser login (#1825)
This commit is contained in:
NguyenTranHoangSym 2023-04-04 09:38:28 +07:00 committed by GitHub
commit a1254f8f0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,6 +162,15 @@ class ProtocolHandler {
);
windowHandler.setMainWindowOrigin(redirectURL);
mainWebContents?.loadURL(redirectURL);
const mainWindow = windowHandler.getMainWindow();
if (mainWindow?.isMinimized()) {
mainWindow.restore();
} else if (mainWindow?.isFullScreen()) {
mainWindow.once('leave-full-screen', () => {
mainWindow.setFullScreen(true);
});
mainWindow.setFullScreen(false);
}
}
}
}