Use SetTouchBar withe empty vector instead of DestroyTouchBar
This commit is contained in:
parent
d5dbe3676e
commit
51f1c5a557
8 changed files with 11 additions and 25 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue