From aec15b4dbea7f59cf584fa7bcddd47a5ef88cbc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20L=C3=A9vy?= Date: Thu, 6 Dec 2018 17:05:47 +0100 Subject: [PATCH] Disabled Electron Transparent on WindowOS --- index.electron.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.electron.js b/index.electron.js index 4ba99b3..5024604 100644 --- a/index.electron.js +++ b/index.electron.js @@ -7,15 +7,21 @@ const { NODE_ENV } = process.env; // be closed automatically when the JavaScript object is garbage collected. let mainWindow; +const isWindowsOS = process.platform.osvar === 'win32'; + + function createWindow() { // Create the browser window. mainWindow = new BrowserWindow({ webPreferences: { + nativeWindowOpen: true, webSecurity: false, allowDisplayingInsecureContent: true, }, title: 'Wavy X', - transparent: true, + vibrancy: !isWindowsOS && 'dark', + transparent: !isWindowsOS, + darkTheme: !isWindowsOS, width: 1024, height: 768, center: true,