From 42d950a2b654476f0a71574cae4bde4e478c6f68 Mon Sep 17 00:00:00 2001 From: Mohammad Fares Date: Tue, 24 Jul 2018 11:00:21 +0300 Subject: [PATCH] Check for the os when hiding the Dock --- render/index.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/render/index.js b/render/index.js index 0986bc1..166c669 100644 --- a/render/index.js +++ b/render/index.js @@ -8,17 +8,20 @@ var path = require('path'), app = require('electron').app, BrowserWindow = require('electron').BrowserWindow, - ipcMain = require('electron').ipcMain; + ipcMain = require('electron').ipcMain, + os = require('os'); // Set as global to be read by the web page global.step = process.argv[2] || 1; -// Hide the Dock for macOS -app.dock.hide(); - // Set the display scale factor to 1 app.commandLine.appendSwitch('force-device-scale-factor', 1); +// Hide the Dock for macOS +if (os.platform() == 'darwin') { + app.dock.hide(); +} + // When the app is ready app.on('ready', createWindow);