remove screen.getMenuBarHeight() deprecation

This commit is contained in:
Shelley Vohr 2018-05-23 09:11:48 -07:00
parent cc30f4c4fd
commit 72c63a10ee
No known key found for this signature in database
GPG key ID: F13993A75599653C
6 changed files with 0 additions and 48 deletions

View file

@ -1,17 +1,8 @@
const {EventEmitter} = require('events')
const {deprecate} = require('electron')
const {screen, Screen} = process.atomBinding('screen')
// Screen is an EventEmitter.
Object.setPrototypeOf(Screen.prototype, EventEmitter.prototype)
EventEmitter.call(screen)
const nativeFn = screen.getMenuBarHeight
screen.getMenuBarHeight = function () {
if (!process.noDeprecations) {
deprecate.warn('screen.getMenuBarHeight', 'screen.getPrimaryDisplay().workArea')
}
return nativeFn.call(this)
}
module.exports = screen