display(macOS): fix stop button on Big Sur

Fixes #7298
This commit is contained in:
osy
2025-07-21 00:04:15 -07:00
parent a16db438e7
commit a6145477c0
@@ -419,6 +419,10 @@ extension VMDisplayWindowController {
menu.addItem(item3)
}
stopToolbarItem.menu = menu
if #unavailable(macOS 12), let view = stopToolbarItem.value(forKey: "_control") as? NSView {
// BUG in macOS 11 results in the button not working without this
stopToolbarItem.view = view
}
}
@MainActor @objc private func requestPowerDown(sender: AnyObject) {