Skip to content

Commit

Permalink
fix: move maximize function to keep main window hidden until ready (#839
Browse files Browse the repository at this point in the history
)
  • Loading branch information
2xAA authored Apr 7, 2023
1 parent 0f66f55 commit fbfff08
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/background/window-prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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();
});
}
}
Expand Down

0 comments on commit fbfff08

Please sign in to comment.