]> khamidou — GitHub mirrors - electron.git/commitdiff
gtk: Do not access clipboard in renderer process.
authorCheng Zhao <zcbenz@gmail.com>
Sat, 5 Apr 2014 06:49:59 +0000 (14:49 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 5 Apr 2014 06:49:59 +0000 (14:49 +0800)
atom/common/api/lib/clipboard.coffee

index d83a5a5944cf61c65d0a554ef307a2025eda93e8..bad679bb6eba1e6dc82a2ea6e99bc6f6c09e15d4 100644 (file)
@@ -1 +1,6 @@
-module.exports = process.atomBinding 'clipboard'
+module.exports =
+  if process.platform is 'linux'
+    # On Linux we could not access clipboard in renderer process.
+    require('remote').process.atomBinding 'clipboard'
+  else
+    process.atomBinding 'clipboard'