Skip to content
Draft
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Menu bar icon is visible on macOS Tahoe 26.6.1 (build 25G76).
- Timer no longer stays active and shows negative seconds after the Mac sleeps past the activation period.

## [1.6.3] - 2026-01-26
Expand Down
6 changes: 3 additions & 3 deletions src/Caffeine/Classes/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, SPUStandardUserDriverDelegat
private var menuBarController: MenuBarController?

func applicationDidFinishLaunching(_: Notification) {
// Hide the dock icon before creating the menu bar-only interface
NSApp.setActivationPolicy(.accessory)

// Create the menu bar controller
self.menuBarController = MenuBarController(updaterController: self.updaterController)

// Hide the dock icon - this is a menu bar only app
NSApp.setActivationPolicy(.accessory)
}

func applicationWillTerminate(_: Notification) {
Expand Down
3 changes: 2 additions & 1 deletion src/Caffeine/Classes/Views/MenuBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ class MenuBarController: NSObject {
}

private func setupMenuBar() {
self.statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
self.statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.squareLength)

guard let button = statusItem?.button else { return }

// Set up button actions (icon will be set after observers are configured)
button.imagePosition = .imageOnly
button.action = #selector(self.statusItemClicked(_:))
button.target = self
button.sendAction(on: [.leftMouseUp, .rightMouseUp])
Expand Down