mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Merge pull request #227 from KiranNiranjan/ELECTRON-197
Electron-197 (Windows Desktop composition)
This commit is contained in:
commit
cd702ab2c3
@ -12,7 +12,8 @@
|
||||
// renderer process, this will have to do. See github issue posted here to
|
||||
// electron: https://github.com/electron/electron/issues/9312
|
||||
|
||||
const { ipcRenderer } = require('electron');
|
||||
const { ipcRenderer, remote } = require('electron');
|
||||
const { isWindowsOS } = require('../utils/misc');
|
||||
|
||||
let nextId = 0;
|
||||
let includes = [].includes;
|
||||
@ -52,6 +53,17 @@ function getSources(options, callback) {
|
||||
};
|
||||
}
|
||||
|
||||
if (isWindowsOS) {
|
||||
/**
|
||||
* Sets the captureWindow to false if Desktop composition
|
||||
* is disabled otherwise true
|
||||
*
|
||||
* Setting captureWindow to false returns only screen sources
|
||||
* @type {boolean}
|
||||
*/
|
||||
captureWindow = remote.systemPreferences.isAeroGlassEnabled();
|
||||
}
|
||||
|
||||
id = getNextId();
|
||||
ipcRenderer.send('ELECTRON_BROWSER_DESKTOP_CAPTURER_GET_SOURCES', captureWindow, captureScreen, updatedOptions.thumbnailSize, id);
|
||||
|
||||
|
@ -4,11 +4,13 @@ const isDevEnv = process.env.ELECTRON_DEV ?
|
||||
process.env.ELECTRON_DEV.trim().toLowerCase() === 'true' : false;
|
||||
|
||||
const isMac = (process.platform === 'darwin');
|
||||
const isWindowsOS = (process.platform === 'win32');
|
||||
|
||||
const isNodeEnv = !!process.env.NODE_ENV;
|
||||
|
||||
module.exports = {
|
||||
isDevEnv: isDevEnv,
|
||||
isMac: isMac,
|
||||
isWindowsOS: isWindowsOS,
|
||||
isNodeEnv: isNodeEnv
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user