fix: Use DISABLE_WINDOW_CHROME check before platform -desktop

This commit is contained in:
Susmitha Girumala committed 2021-09-23 21:08:21 -04:00
1 parent 52b5a06755
commit f987b908fc
2 files changed
+8 -8

No files matched your search

+2 -1
View File
@@ -115,7 +115,8 @@ app.on('ready', async () => {
/**
* Enable electron OS window frame/chrome for MacOS only.
* Disable frame/chrome regardless of OS when `DISABLE_WINDOW_CHROME` is set.
* Disable frame/chrome regardless of OS when
* `DISABLE_WINDOW_CHROME=true`.
*/
let showWindowChrome = isMac();
if (process.env.DISABLE_WINDOW_CHROME) showWindowChrome = false;
+6 -7
View File
@@ -70,8 +70,8 @@ handle('stop', ({ session_id }) => sessionManager.stopById(session_id));
/**
* Check for OS window chrome. Enabled on MacOS only.
* Window chrome is disabled regardless of platform when
* `DISABLE_WINDOW_CHROME` env var is enabled.
* Window chrome is disabled regardless of platform for
* `DISABLE_WINDOW_CHROME=true`.
*/
handle('hasMacOSChrome', () =>
process.env.DISABLE_WINDOW_CHROME ? false : isMac()
@@ -79,12 +79,11 @@ handle('hasMacOSChrome', () =>
/**
* Show window actions for non-MacOS platforms.
* Window actions are disabled regardless of platform when
* `DISABLE_WINDOW_CHROME` env var is enabled.
* Window actions are disabled regardless of platform for
* `DISABLE_WINDOW_CHROME=true`.
*/
handle(
'showWindowActions',
() => !isMac() || process.env.DISABLE_WINDOW_CHROME
handle('showWindowActions', () =>
process.env.DISABLE_WINDOW_CHROME ? false : !isMac()
);
/**