Browse Source

AGT-13 prevent non-main window resize

all-modes
pbca26 8 years ago
parent
commit
22997fd9cc
  1. 10
      main.js

10
main.js

@ -82,7 +82,7 @@ shepherd.writeLog(`app started in ${(appConfig.dev ? 'dev mode' : ' user mode')}
shepherd.setConfKMD(); shepherd.setConfKMD();
if (appConfig.killIguanaOnStart) { if (appConfig.killIguanaOnStart) {
// shepherd.killRogueProcess('iguana'); shepherd.killRogueProcess('iguana');
} }
guiapp.use(function(req, res, next) { guiapp.use(function(req, res, next) {
@ -174,6 +174,8 @@ function createLoadingWindow() {
}); });
} catch(e) {} } catch(e) {}
loadingWindow.setResizable(false);
// check if agama is already running // check if agama is already running
portscanner.checkPortStatus(appConfig.agamaPort, '127.0.0.1', function(error, status) { portscanner.checkPortStatus(appConfig.agamaPort, '127.0.0.1', function(error, status) {
// Status is 'open' if currently in use or 'closed' if available // Status is 'open' if currently in use or 'closed' if available
@ -281,6 +283,8 @@ function createAppCloseWindow() {
show: false, show: false,
}); });
appCloseWindow.setResizable(false);
appCloseWindow.loadURL(`http://${appConfig.host}:${appConfig.agamaPort}/gui/startup/app-closing.html`); appCloseWindow.loadURL(`http://${appConfig.host}:${appConfig.agamaPort}/gui/startup/app-closing.html`);
appCloseWindow.webContents.on('did-finish-load', function() { appCloseWindow.webContents.on('did-finish-load', function() {
@ -304,6 +308,8 @@ function createAppSettingsWindow() {
show: false, show: false,
}); });
appSettingsWindow.setResizable(false);
appSettingsWindow.appConfig = appConfig; appSettingsWindow.appConfig = appConfig;
appSettingsWindow.appConfigSchema = shepherd.appConfigSchema; appSettingsWindow.appConfigSchema = shepherd.appConfigSchema;
appSettingsWindow.defaultAppSettings = _defaultAppSettings; appSettingsWindow.defaultAppSettings = _defaultAppSettings;
@ -540,7 +546,7 @@ app.on('window-all-closed', function() {
// Calling event.preventDefault() will prevent the default behaviour, which is terminating the application. // Calling event.preventDefault() will prevent the default behaviour, which is terminating the application.
app.on('before-quit', function(event) { app.on('before-quit', function(event) {
shepherd.log('before-quit'); shepherd.log('before-quit');
// shepherd.killRogueProcess('iguana'); // kill any rogue iguana core instances shepherd.killRogueProcess('iguana'); // kill any rogue iguana core instances
if (!forceQuitApp && mainWindow === null && loadingWindow != null) { // mainWindow not intitialised and loadingWindow not dereferenced if (!forceQuitApp && mainWindow === null && loadingWindow != null) { // mainWindow not intitialised and loadingWindow not dereferenced
// loading window is still open // loading window is still open

Loading…
Cancel
Save