Get native theme through IPC not remote
This commit is contained in:
parent
d2cc8e5aa9
commit
71572db7a9
16 changed files with 227 additions and 60 deletions
6
main.js
6
main.js
|
@ -122,6 +122,7 @@ const {
|
|||
} = require('./ts/types/Settings');
|
||||
const { Environment } = require('./ts/environment');
|
||||
const { ChallengeMainHandler } = require('./ts/main/challengeMain');
|
||||
const { NativeThemeNotifier } = require('./ts/main/NativeThemeNotifier');
|
||||
const { PowerChannel } = require('./ts/main/powerChannel');
|
||||
const { maybeParseUrl, setUrlSearchParams } = require('./ts/util/url');
|
||||
|
||||
|
@ -136,6 +137,9 @@ const systemTraySettingCache = new SystemTraySettingCache(
|
|||
|
||||
const challengeHandler = new ChallengeMainHandler();
|
||||
|
||||
const nativeThemeNotifier = new NativeThemeNotifier();
|
||||
nativeThemeNotifier.initialize();
|
||||
|
||||
let sqlInitTimeStart = 0;
|
||||
let sqlInitTimeEnd = 0;
|
||||
|
||||
|
@ -303,6 +307,8 @@ function handleCommonWindowEvents(window) {
|
|||
window.webContents.on('preload-error', (event, preloadPath, error) => {
|
||||
console.error(`Preload error in ${preloadPath}: `, error.message);
|
||||
});
|
||||
|
||||
nativeThemeNotifier.addWindow(window);
|
||||
}
|
||||
|
||||
const DEFAULT_WIDTH = 800;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue