Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Ice/UI/IceBar/IceBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ final class IceBarPanel: NSPanel {
// can't currently display its menu bar items.
appState.menuBarManager.isMenuBarHiddenBySystemUserDefaults,
let info = window.flatMap({ WindowInfo(windowID: CGWindowID($0.windowNumber)) }),
info.windowID != 0,
// Window being offscreen means the menu bar is currently hidden.
// Close the bar, as things will start to look weird if we don't.
!info.isOnScreen
Expand Down
4 changes: 2 additions & 2 deletions Ice/Utilities/Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ extension NSBezierPath {
shadow.shadowColor = color

// swiftlint:disable:next force_cast
let path = copy() as! NSBezierPath
guard let path = copy() as? NSBezierPath else { return }

context.saveGraphicsState()

Expand Down Expand Up @@ -429,7 +429,7 @@ extension NSScreen {
var displayID: CGDirectDisplayID {
// Value and type are guaranteed here, so force casting is okay.
// swiftlint:disable:next force_cast
deviceDescription[NSDeviceDescriptionKey("NSScreenNumber")] as! CGDirectDisplayID
deviceDescription((deviceDescription[NSDeviceDescriptionKey("NSScreenNumber")] as? NSNumber)?.uint32Value ?? 0
}

/// A Boolean value that indicates whether the screen has a notch.
Expand Down