Skip to content

Commit

Permalink
fixed transparency bug with progress window
Browse files Browse the repository at this point in the history
  • Loading branch information
matortheeternal committed Aug 27, 2021
1 parent bc3b33e commit fba8990
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/javascripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ global.env = require('./env');
global.argv = process.argv;

let mainWindow, progressWindow, showProgressTimeout, lastProgressMessage;
let webPreferences = { nodeIntegration: true, contextIsolation: false, enableRemoteModule: true };
let baseWebPreferences = {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true
};

let logger = new Logger();
logger.init('main');
Expand Down Expand Up @@ -76,8 +80,10 @@ let openMainWindow = function() {
mainWindow = createWindow('main', {
frame: false,
show: false,
backgroundColor: '#555',
webPreferences
webPreferences: {
...baseWebPreferences,
backgroundColor: '#555'
}
});
logger.info('Main window created');
logger.info('Loading application...');
Expand All @@ -95,7 +101,7 @@ let openProgressWindow = function() {
let t = !process.argv.includes('--disable-transparency'),
debugProgress = process.argv.includes('--debug-progress');
logger.info(`Window transparency is ${t ? 'en' : 'dis'}abled`);
logger.info(`Progress window is${debugProgress ? ' ' : ' not '}modal`);
logger.info(`Progress window is${debugProgress ? ' not ' : ' '}modal`);
logger.info('Creating progress window...');

let progressWindowOptions = {
Expand All @@ -110,7 +116,7 @@ let openProgressWindow = function() {
minimizable: debugProgress,
resizable: debugProgress,
movabale: debugProgress,
webPreferences: {nodeIntegration: true}
webPreferences: { ...baseWebPreferences }
};
if (debugProgress) {
progressWindowOptions.width = 900;
Expand Down

0 comments on commit fba8990

Please sign in to comment.