linux: screen module can not be used in renderer.

This commit is contained in:
Cheng Zhao 2014-07-10 10:26:17 +08:00
parent e150a3e3b2
commit 83ff00dc29
3 changed files with 8 additions and 34 deletions

View file

@ -1 +1,6 @@
module.exports = process.atomBinding 'screen'
module.exports =
if process.platform is 'linux' and process.type is 'renderer'
# On Linux we could not access screen in renderer process.
require('remote').require 'screen'
else
process.atomBinding 'screen'