Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move maximize function to keep main window hidden until ready #839

Merged
merged 1 commit into from
Apr 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: move maximize function to keep main window hidden until ready
2xAA committed Apr 7, 2023
commit ecdb65bc6231b8b0c307fc59fe62a11c50d73806
11 changes: 7 additions & 4 deletions src/background/window-prefs.js
Original file line number Diff line number Diff line change
@@ -63,6 +63,12 @@ const windowPrefs = {
unique: true,

beforeCreate() {
dialog.showMessageBoxSync({
message: JSON.stringify({
isDevelopment,
NODE_ENV: process.env.NODE_ENV
})
});
const { width, height } = screen.getPrimaryDisplay().workAreaSize;

return {
@@ -211,16 +217,13 @@ const windowPrefs = {
unique: true,

async create(window) {
windows["mainWindow"].maximize();

ipcMain.on("modv-ready", () => {
try {
window.close();
} catch (e) {
console.error(e);
}

windows["mainWindow"].show();
windows["mainWindow"].maximize();
});
}
}