From 3d518c210515519f6f67d53f732cd4ddf940fff1 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 5 Apr 2014 14:49:59 +0800 Subject: [PATCH] gtk: Do not access clipboard in renderer process. --- atom/common/api/lib/clipboard.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/atom/common/api/lib/clipboard.coffee b/atom/common/api/lib/clipboard.coffee index d83a5a5944..bad679bb6e 100644 --- a/atom/common/api/lib/clipboard.coffee +++ b/atom/common/api/lib/clipboard.coffee @@ -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'