2013-05-15 11:19:35 +00:00
|
|
|
EventEmitter = require('events').EventEmitter
|
2013-05-16 15:00:43 +00:00
|
|
|
objectsRegistry = require '../../atom/objects_registry.js'
|
2013-05-15 11:19:35 +00:00
|
|
|
|
|
|
|
BrowserWindow = process.atomBinding('window').BrowserWindow
|
|
|
|
BrowserWindow.prototype.__proto__ = EventEmitter.prototype
|
|
|
|
|
2013-05-16 15:00:43 +00:00
|
|
|
BrowserWindow.getFocusedWindow = ->
|
|
|
|
windows = objectsRegistry.getAllWindows()
|
|
|
|
return window for window in windows when window.isFocused()
|
|
|
|
|
2013-05-15 11:19:35 +00:00
|
|
|
module.exports = BrowserWindow
|