Use SetTouchBar withe empty vector instead of DestroyTouchBar

This commit is contained in:
Kevin Sawicki 2017-03-01 11:05:34 -08:00
parent d5dbe3676e
commit 51f1c5a557
8 changed files with 11 additions and 25 deletions

View file

@ -38,6 +38,8 @@ class TouchBar extends EventEmitter {
// Already added to window
if (this.windowListeners.hasOwnProperty(id)) return
window._touchBar = this
const changeListener = (itemID) => {
window._refreshTouchBarItem(itemID)
}
@ -61,7 +63,7 @@ class TouchBar extends EventEmitter {
window.once('closed', removeListeners)
this.windowListeners[id] = removeListeners
window._setTouchBar(this.ordereredItems)
window._setTouchBarItems(this.ordereredItems)
}
// Called by BrowserWindow.setTouchBar