Make remote.getCurrentWindow work for devtools.

This commit is contained in:
Cheng Zhao 2014-04-04 22:28:47 +08:00
parent f5fc26d8fc
commit 03e6d564d7

View file

@ -98,6 +98,7 @@ ipc.on 'ATOM_BROWSER_CURRENT_WINDOW', (event, processId, routingId) ->
try
BrowserWindow = require 'browser-window'
window = BrowserWindow.fromProcessIdAndRoutingId processId, routingId
window = BrowserWindow.fromDevTools processId, routingId unless window?
event.returnValue = valueToMeta processId, routingId, window
catch e
event.returnValue = errorToMeta e