Update HUDs to show up betterdisplay

This commit is contained in:
Hariharan Mudaliar 2026-03-03 00:19:51 +05:30
commit cead5f9ce8
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E
7 changed files with 66 additions and 28 deletions

View file

@ -136,13 +136,13 @@ final class VerticalHUDWindowManager {
windows.removeAll()
}
func show(type: SneakContentType, value: CGFloat, icon: String = "") {
func show(type: SneakContentType, value: CGFloat, icon: String = "", onScreen targetScreen: NSScreen? = nil) {
guard Defaults[.enableVerticalHUD] else { return }
let screens = NSScreen.screens
let screens = targetScreen.map { [$0] } ?? NSScreen.screens
guard !screens.isEmpty else { return }
// Show on all screens
// Show on target screen(s)
for screen in screens {
let windowContext = ensureWindow(for: type, screen: screen)
updateContent(window: windowContext, type: type, value: value, icon: icon)