1.Step
mainWindow = new BrowserWindow({
width: 1200,
height: 700,
center: true,
'min-height': 700,
'min-width': 1200,
webPreferences: {nodeIntegration:true}});
mainWindow.loadURL(HOME_URL);
2.Step (some event occur and i want to temporary hide main window and show another(createFacebookWindow() fn is already loadingURL))
mainWindow.hide();
facebookWindow = require('./modules/auth/views.js').createFacebookWindow();
FB Window settings ({
width: 1200,
height: 700,
center: true,
'min-height': 700,
'min-width': 1200,
webPreferences: {nodeIntegration:false}})
3.Step (another event occur i destroy fb window and show main window)
facebookWindow.close();
facebookWindow.on('closed', function() {
facebookWindow = null;
mainWindow.show();
//I tried below options it doesn't work
//mainWindow.setSize(1200, 700);
//mainWindow.setMinimumSize(1200, 700);
Summary:
So actually after these steps, when I show mainWindow back it doesn't remember mainWindow settings min-height and min-width are not working.
When facebookWindow is not opened, all is fine, so something must happening during switching with windows. Maybe something is done in wrong order ?